agentleFS
Prorise-coolProrise-cool/claude-code-plugins/CLAUDE.md

claude-code-plugins

CLAUDE.md1 starsChanged 11 months agoMITView on GitHub

See @README.md for project overview and installation. Before EVERY tool use, ask yourself: If you're about to do something "quick" or "clever" → STOP. That's a red flag. Routing: Microsoft tech → microsoft-learn (then validate with perplexity), libraries → context7+ref, general → perplexity+firecrawl. Training data may be stale - always verify with MCP. See .claude/memory/mcp-usage-patterns.md - Git Bash on Windows: Use MSYS_NO_PATHCONV=1 prefix to prevent path conversion issues when running scripts - ⛔ CRITICAL: Windows Edit Tool Bug - If…

  • Deletes or force-pushes

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

24 rules. About 0 are common, 18 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Set plugin dev mode: when modifying plugin scripts - use env vars for local code instead of installed plugin.

    line 34
  2. Distinctive:

    Research: Before answering ANY technical question about libraries, frameworks, APIs, versions, best practices

    line 37
  3. Distinctive:

    Implementation: Verify code patterns, configurations, and dependencies are current before writing code

    line 40
  4. Very specific:

    Git Bash on Windows: Use MSYS_NO_PATHCONV=1 prefix to prevent path conversion issues when running scripts

    line 45
  5. Distinctive:

    ⛔ CRITICAL: Windows Edit Tool Bug: - If Edit tool fails with "File has been unexpectedly modified":

    line 46
  6. Distinctive:

    Or use Write tool: Read full file, modify in memory, Write entire content back

    line 49
  7. Distinctive:

    Never use hardcoded rules: - all validation must be docs-driven and dynamic

    line 59
  8. Very specific:

    ⚠️ CRITICAL: No Suppressions Without MCP Verification: - Before adding ANY linter suppression (# noqa, // eslint-disable, #pragma warning …

    line 63
  9. Distinctive:

    Research via MCP FIRST: - Check if there's a proper fix

    line 64
  10. Distinctive:

    Verify no solution exists: - Check for overloads, alternatives, proper patterns

    line 65
  11. Distinctive:

    Only suppress after PROOF: - Never assume "this can't be fixed"

    line 66
  12. Very specific:

    ⚠️ CRITICAL: Fix Code, Never Relax Rules: - When code violates analyzer/linting/style rules:

    line 70
  13. Very specific:

    Run cc-check to detect if global plugins might cause doubling:

    line 143
  14. Distinctive:

    Commit and push to GitHub

    line 164
  15. Distinctive:

    Trust But Verify: Before making ANY change based on discovered issues, validate claims using MCP servers (microsoft-learn, context7, …

    line 170
  16. Distinctive:

    Diagnose Before Theorizing: When investigating issues, gather concrete evidence (logs, error messages, actual state, reproduction steps) …

    line 171
  17. Distinctive:

    TDD/BDD: When adding or changing non-trivial behavior, prefer test-driven development

    line 172
  18. Distinctive:

    Consistency: Use the same patterns, structures, and naming everywhere - extend existing approaches

    line 173
  19. Distinctive:

    Pattern-First: Before adding docs, workflows, or structures, look for existing patterns and align to them

    line 174
  20. Distinctive:

    AI-Friendly Structure: Use predictable sections (Overview, Prerequisites, Installation, Configuration, Verification, Troubleshooting)

    line 175
  21. Distinctive:

    Cross-Platform: Treat Windows, macOS, and Linux as first-class - consider platform differences up front

    line 176
  22. Distinctive:

    ASCII Punctuation: Use straight quotes - smart/curly quotes cause encoding issues in scripts

    line 177
  23. Distinctive:

    UTF-8 Encoding: Use UTF-8 for all files, preserve Unicode, set encoding in Python scripts.

    line 178
  24. Very specific:

    Human-Readable Code: Write code that reads naturally.

    line 183

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

See @README.md for project overview and installation.


⛔ STOP AND CHECK (Before Every Action) ⛔

Before EVERY tool use, ask yourself:

CheckIf No, STOP
Did I verify this with MCP?Research first
Am I complying with project rules?Don't circumvent
Does this need user permission?Ask first
Is this the minimal change?Don't over-engineer
Edit failed?Use sed or cat > file << 'EOF'. ⛔ NEVER PowerShell ⛔
About to use PowerShell for files?STOP. Use bash instead. ALWAYS.
Adding suppression/exclusion?MCP verify the API first
Modifying config files?Ask permission first
⛔ Destructive git command?NEVER run git reset --hard, git clean -fd, git checkout . without EXPLICIT permission

If you're about to do something "quick" or "clever" → STOP. That's a red flag.


Critical Rules (Repo-Specific)

  • ⚠️ FOUNDATIONAL: Correctness Over Speed - Optimize for correctness and compliance, NOT speed and completion. Before ANY action: (1) Verify with MCP/docs, (2) Comply with project rules, (3) Ask permission for architectural decisions, (4) Use minimal intervention. See .claude/memory/behavioral-guardrails.md
  • Use Python 3.13 for spaCy operations
  • Set plugin dev mode when modifying plugin scripts - use env vars for local code instead of installed plugin. See .claude/memory/plugin-dev-mode.md
  • Use docs-management skill for documentation indexes - invoke the skill to search docs rather than reading index.yaml files directly
  • ⚠️ CRITICAL: Proactive MCP Server Usage - MCP servers (perplexity, microsoft-learn, ref, context7, firecrawl) are your PRIMARY research tools, not optional conveniences. MUST use MCP servers proactively for:

    • Research: Before answering ANY technical question about libraries, frameworks, APIs, versions, best practices
    • Verification: Validate version numbers, API signatures, patterns, breaking changes before implementing
    • Planning: Research current approaches, architecture patterns, and trade-offs before designing solutions
    • Implementation: Verify code patterns, configurations, and dependencies are current before writing code
    • Reviews: Cross-check recommendations against authoritative sources
    • Validation: Confirm technical claims, compatibility matrices, and deprecation status

    Routing: Microsoft tech → microsoft-learn (then validate with perplexity), libraries → context7+ref, general → perplexity+firecrawl. Training data may be stale - always verify with MCP. See .claude/memory/mcp-usage-patterns.md

  • Git Bash on Windows: Use MSYS_NO_PATHCONV=1 prefix to prevent path conversion issues when running scripts
  • ⛔ CRITICAL: Windows Edit Tool Bug - If Edit tool fails with "File has been unexpectedly modified":

    1. DO NOT retry Edit - it will fail again
    2. Use sed: MSYS_NO_PATHCONV=1 sed -i 's/old/new/g' /path/to/file
    3. Or use Write tool: Read full file, modify in memory, Write entire content back
    4. Use backslashes in paths: C:\path\file.txt not C:/path/file.txt (Issue #10437)
    5. ⛔ POWERSHELL IS FORBIDDEN ⛔ - No Set-Content, no -replace, no .ps1 scripts. Issue #15326: user lost 3,500-line file. If you even THINK "PowerShell", STOP.

    See .claude/memory/windows-edit-tool-bug.md for details.

  • ⚠️ CRITICAL: Load Skills BEFORE Auditing/Modifying Plugin Components - When auditing or modifying skills, agents, commands, hooks, output-styles, etc. (any Claude Code ecosystem component/concept) you MUST:

    1. Load the relevant skill FIRST (e.g., subagent-development for agents, skill-development for skills, command-development for commands, hook-management for hooks, output-customization for output styles, and so on)
    2. Read the skill thoroughly - skills contain field definitions (including undocumented fields like color for agents), validation criteria, and keyword registries
    3. Follow the skill's delegation to docs-management - skills delegate to docs-management for official documentation; validation criteria comes from official docs, not assumptions
    4. Never use hardcoded rules - all validation must be docs-driven and dynamic

    The audit chain is typically: Command → Agent → Skill → docs-management. Each level must properly delegate to the next. Skipping this chain leads to incorrect modifications (e.g., removing valid undocumented fields).

  • ⚠️ CRITICAL: No Suppressions Without MCP Verification - Before adding ANY linter suppression (# noqa, // eslint-disable, #pragma warning disable, etc.):

    1. Research via MCP FIRST - Check if there's a proper fix
    2. Verify no solution exists - Check for overloads, alternatives, proper patterns
    3. Only suppress after PROOF - Never assume "this can't be fixed"

    See .claude/memory/code-analysis-verification.md for details.

  • ⚠️ CRITICAL: Fix Code, Never Relax Rules - When code violates analyzer/linting/style rules:

    1. FIX THE CODE to comply - this is always the default action
    2. NEVER modify configuration to bypass rules (.editorconfig, .eslintrc, Directory.Build.props, etc.)
    3. ASK before proposing rule changes - even if "samples use different patterns"

    See .claude/memory/rule-compliance.md for details.

Plugin Development Isolation

This repo contains the source for plugins that are also installed globally. The --plugin-dir flag is ADDITIVE - it doesn't disable globally installed plugins. Use these aliases to avoid plugin doubling.

Alias Quick Reference

Source file: setup/bashrc-claude.sh (sourced from ~/.bashrc)

TierAliasDescription
Tier 1: Base CCccClaude wrapper (handles slash commands)
cc-yolo+ --dangerously-skip-permissions
cc-plan+ --permission-mode plan
cc-opus / cc-sonnetModel selection
cc-cont / cc-cont-yoloContinue last conversation
cc-headlessScripting mode (-p --output-format json)
Tier 2: CC-Devcc-devAll dev plugins (works from ANY directory)
cc-dev-yoloAll dev plugins + skip permissions
cc-dev-coreCore 4 plugins only
cc-dev-planAll dev plugins + plan mode
cc-dev-{workload}Workload-specific (security, ai, docs, saas, test)
Short AliasccaAll plugins + yolo (works from ANY directory)
Tier 3: CCPccpAll plugins + yolo (CDs to plugin repo)
ccp-coreCore workload (~1.2K tokens)
ccp-devDev workload (~2.6K tokens)
ccp-archArchitecture workload (~4.2K tokens)
ccp-baBusiness analysis workload (~3.7K tokens)
ccp-{workload}security, ai, docs, saas, test
Utilitiescc-pluginsShow plugin configuration
cc-checkDetect global plugin conflicts

Two-Terminal Workflow

# Terminal 1: Plugin development
cd ~/repos/claude-code-plugins
ccp                 # Uses dev plugins via --plugin-dir

# Terminal 2: Other repo (uses SAME dev plugins)
cd ~/repos/citadel
cc-dev-yolo         # Uses dev plugins from $CCP_REPO - no doubling!

Both terminals use identical plugin source from $CCP_REPO/plugins.

Adding/Removing Plugins from Workloads

Edit the arrays at the top of setup/bashrc-claude.sh:

CC_PLUGINS_CORE=(claude-ecosystem code-quality git melodic-software)
CC_PLUGINS_DEV=(tac spec-driven-development)
CC_PLUGINS_ARCH=(enterprise-architecture systems-design data-architecture visualization tac)
CC_PLUGINS_BA=(business-analysis requirements-elicitation spec-driven-development)
CC_PLUGINS_SECURITY=(security compliance-planning)
CC_PLUGINS_AI=(ai-ml-planning google-ecosystem openai-ecosystem cursor-ecosystem)
CC_PLUGINS_DOCS=(documentation-standards spec-driven-development)
CC_PLUGINS_SAAS=(saas-patterns product-discovery content-management-system)
CC_PLUGINS_TEST=(test-strategy contract-testing)
CC_PLUGINS_EXCLUDE=()  # Add broken plugins here to skip them

Then re-source: source ~/.bashrc

Conflict Detection

Run cc-check to detect if global plugins might cause doubling:

$ cc-check
=== Plugin Conflict Check ===
WARNING: Global plugins detected in: ~/.claude/plugins/cache/melodic-software/
To fix: rm -rf ~/.claude/plugins/cache/melodic-software/

DEV Mode for Scripts

Scripts that write to disk must use DEV mode to write to dev repo instead of global cache:

OFFICIAL_DOCS_DEV_ROOT="D:/repos/gh/melodic/claude-code-plugins/plugins/claude-ecosystem/skills/docs-management" python <script>

See .claude/memory/plugin-dev-mode.md for all DEV mode variables.

Promoting Changes to Global

  1. Commit and push to GitHub
  2. In any Claude session: /plugin marketplace update melodic-software
  3. Restart Claude Code to pick up changes

General Software Principles

  • Trust But Verify: Before making ANY change based on discovered issues, validate claims using MCP servers (microsoft-learn, context7, perplexity, ref). Never assume - always confirm version numbers, API signatures, patterns, and technical claims against authoritative sources before applying fixes
  • Diagnose Before Theorizing: When investigating issues, gather concrete evidence (logs, error messages, actual state, reproduction steps) before proposing causes or solutions. Theories are starting points for investigation, not substitutes for it
  • TDD/BDD: When adding or changing non-trivial behavior, prefer test-driven development
  • Consistency: Use the same patterns, structures, and naming everywhere - extend existing approaches
  • Pattern-First: Before adding docs, workflows, or structures, look for existing patterns and align to them
  • AI-Friendly Structure: Use predictable sections (Overview, Prerequisites, Installation, Configuration, Verification, Troubleshooting)
  • Cross-Platform: Treat Windows, macOS, and Linux as first-class - consider platform differences up front
  • ASCII Punctuation: Use straight quotes - smart/curly quotes cause encoding issues in scripts
  • UTF-8 Encoding: Use UTF-8 for all files, preserve Unicode, set encoding in Python scripts. Emojis (✅, ⚠️, ⛔, etc.) are allowed in documentation examples and output format specifications - they render correctly in terminals with Unicode support
  • UTC Timestamps: Store persisted data in UTC (ISO-8601), convert to local only for display
  • DRY: Minimize duplicated variables, magic strings, magic numbers, repeated code
  • Law of Demeter: Minimize coupling by talking only to immediate friends
  • Best tool for the job: Choose languages, libraries, techniques that keep solutions simple and testable
  • Human-Readable Code: Write code that reads naturally. Use descriptive names: if is_valid and has_permission rather than cryptic abbreviations. Prefer positive naming: if is_not_available instead of if not is_available
  • Minimal Comments: Code should be self-documenting. Avoid obligatory comments unless truly necessary (explaining non-obvious "why" decisions, complex algorithms). Let the code speak for itself through clear naming and structure

Documentation

For Claude Code topics, invoke the docs-management skill.

For Gemini CLI topics, invoke the gemini-cli-docs skill.

Build and Test Commands

Python Tests (hooks, scripts)

# From plugin with tests (e.g., docs-management)
cd plugins/claude-ecosystem/skills/docs-management
pytest -v

# With coverage
pytest --cov=. --cov-report=term-missing

Markdown Linting

# Via command
/code-quality:lint-md

# Or directly
npx markdownlint-cli2 "**/*.md"

Validate Plugin Components

/claude-ecosystem:audit-skills
/claude-ecosystem:audit-commands
/claude-ecosystem:audit-agents

Architecture Overview

Plugin Structure

plugins/<plugin-name>/
  .claude-plugin/
    plugin.json        # Plugin manifest (name, version, description)
  skills/              # Skills (noun-phrase names, e.g., "docs-management")
    <skill-name>/
      SKILL.md         # Skill definition with YAML frontmatter
      references/      # Supporting docs loaded on-demand
      scripts/         # Python/Bash automation scripts
  commands/            # Slash commands (verb-phrase names, e.g., "scrape-docs")
  agents/              # Subagent definitions
  hooks/               # Hook configurations

Documentation Management Pattern

The docs-management and gemini-cli-docs skills manage scraped official documentation with search indexes. Always invoke the skill to search docs - never read index.yaml directly. Skills handle search ranking, keyword extraction, and subsection loading.

Key Plugins

PluginPurpose
claude-ecosystemClaude Code docs, skills (docs-management, hook-management, memory-management), hooks
google-ecosystemGemini CLI docs (gemini-cli-docs), planning agents
code-qualityCode review, markdown linting, debugging
tacADW workflows, prompt engineering, agent design
gitGit operations (config, GPG signing, hooks, GitHub issues)

Conventions

  • Skills: noun-phrase names (hook-management)
  • Commands: verb-phrase names (scrape-docs)
  • Skills use allowed-tools, agents use tools in frontmatter
  • YAML frontmatter required for SKILL.md files (name, description, allowed-tools)
  • References loaded progressively (just-in-time) to optimize tokens
  • Skill tool uses fully qualified names: Skill(plugin:skill-name) for plugin skills, not Skill(skill-name)

Detailed Documentation

For comprehensive guidance on working with this repository, see:

Always Loaded (Core Principles):

  • Behavioral Guardrails @.claude/memory/behavioral-guardrails.md (~1,800 tokens) - CRITICAL: Verify before acting, comply don't circumvent, ask before architectural decisions
  • Command/Skill Execution Protocol @.claude/memory/command-skill-protocol.md (~2,800 tokens) - CRITICAL: Prevents context collapse when executing commands/skills
  • Operational Rules @.claude/memory/operational-rules.md (~2,400 tokens) - Core operational guidance (temp files, error handling, workflow management)
  • Claude Code ecosystem reference @.claude/memory/claude-code-ecosystem.md (~2,300 tokens) - Enforcement layers, skills table, and delegation pattern for Claude Code documentation
  • MCP Usage Patterns @.claude/memory/mcp-usage-patterns.md (~2,500 tokens) - CRITICAL: Proactive MCP usage, research-first mindset, technology routing
  • Natural Language Prompting @.claude/memory/natural-language-guidance.md (~700 tokens) - Natural language, intent, agentic instructions
  • Failure Generalization @.claude/memory/failure-generalization.md (~400 tokens) - Generalize lessons from specific failures to category-level prevention
  • Windows Edit Tool Bug @.claude/memory/windows-edit-tool-bug.md (~1,000 tokens) - CRITICAL: Edit tool retry loops, mandatory fallback to sed/Write
  • Code Analysis Verification @.claude/memory/code-analysis-verification.md (~1,000 tokens) - CRITICAL: No pragma suppressions without MCP verification
  • Rule Compliance @.claude/memory/rule-compliance.md (~600 tokens) - CRITICAL: Fix code to comply, never relax rules

Context-Dependent (Load When Needed):

  • Path Conventions .claude/memory/path-conventions.md (~2,105 tokens) - Path resolution, absolute paths, path doubling, script execution
  • Script Automation .claude/memory/script-automation.md (~2,180 tokens) - PowerShell, Python, Bash, script creation, automation
  • Agent Usage Patterns .claude/memory/agent-usage-patterns.md (~3,370 tokens) - Parallelization, subagents, model selection, agent communication
  • Performance Quick Start .claude/memory/performance-quick-start.md (~1,925 tokens) - Performance, speed, latency, optimization
  • Workflows .claude/memory/workflows.md (~4,400 tokens) - TDD, visual iteration, headless mode, multi-Claude, plan mode
  • Behavioral Principles .claude/memory/behavioral-principles.md (~1,600 tokens hub, ~2,300 tokens with research) - Communication, autonomy, limitations, transparency
  • Anti-Patterns & Design Decisions .claude/memory/anti-patterns.md (~1,880 tokens) - @-file bloat, slash command over-engineering, hook timing
  • Audit Protocol .claude/memory/audit-protocol.md (~1,500 tokens) - Component-to-skill mapping, mandatory pre-audit skill loading
  • Tool Optimization .claude/memory/tool-optimization.md (~2,200 tokens) - Tool design, tool selection, namespacing, error messages
  • Context Engineering .claude/memory/context-engineering.md (~4,390 tokens) - Context window, /compact, /clear, context rot, token budget
  • Hook Timing Philosophy .claude/memory/hook-timing-philosophy.md (~2,050 tokens) - PreToolUse, PostToolUse, block-at-submit, auto-fix
  • Testing Principles .claude/memory/testing-principles.md (~800 tokens hub, ~7,000 tokens total with details) - FIRST principles, test pyramid, AAA pattern, mocking
  • Clean Code Guidelines .claude/memory/clean-code-guidelines.md (~1,000 tokens hub, ~16,000 tokens with all references) - SOLID, code smells, refactoring, naming conventions
  • Engineering Best Practices .claude/memory/engineering-best-practices.md (~1,225 tokens) - Concurrency, caching, error handling, resilience
  • Anti-Duplication Enforcement .claude/memory/anti-duplication-enforcement.md (~2,000 tokens) - Duplicate content, consolidation, single source of truth
  • Model Identification .claude/memory/model-identification.md (~710 tokens) - Model identity, Opus, Sonnet, Haiku, audit metadata
  • Prompting Style Guide .claude/memory/prompting-style-guide.md (~3,090 tokens) - Tone, prompting, Claude 4.5 best practices
  • Standard Operating Procedures .claude/memory/standard-operating-procedures.md (~1,500 tokens) - SOP, best practices, agent execution
  • Claude Code Antipatterns .claude/memory/claude-code-antipatterns.md (~1,200 tokens hub, ~10,600 tokens with all details) - Antipatterns, bad practices, Opus 4.5 issues
  • Session Configuration .claude/memory/session-configuration.md (~2,500 tokens) - HTTPS_PROXY, timeout, API keys, session persistence
  • GitHub Actions Patterns .claude/memory/github-actions-patterns.md (~2,195 tokens) - GitHub Actions, CI/CD, PR automation
  • Plugin Dev Mode .claude/memory/plugin-dev-mode.md (~1,600 tokens) - Dev mode env vars, installed vs local plugin, scraping to dev repo
  • Settings Configuration .claude/memory/settings-configuration.md (~2,800 tokens) - Permission model, hook env vars, security, MCP permissions
  • Known Claude Code Issues .claude/memory/known-claude-code-issues.md (~800 tokens hub) - Index of Claude Code bug workarounds. Loads platform-specific files:
    • known-issues/windows.md (~2,000 tokens) - Edit tool, PowerShell, hooks
    • known-issues/macos.md (~1,000 tokens) - Terminal, display issues
    • known-issues/cross-platform.md (~1,500 tokens) - Performance, MCP, permissions

Claude Code Ecosystem:

  • Claude Code Topics Index .claude/memory/claude-code-topics-index.md (~3,420 tokens) - Hooks, memory, skills, subagents, MCP, plugins, settings, SDK

Token Budget Summary:

CategoryToken CountNotes
Always Loaded (Core)~15,30010 files, auto-loaded every session
Context-Dependent~600-4,400 eachLoad on-demand as needed
Hub Files (expanded)~7,000-16,000Testing, Clean Code, Antipatterns
Topics Index~3,420Claude Code feature lookup

Last Updated: 2025-12-30

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.