agentleFS
OdradekAIOdradekAI/bundles-forge/CLAUDE.md

bundles-forge

CLAUDE.md229 starsChanged 7 months agoApache-2.0View on GitHub

Bundles Forge is a bundle-plugin engineering toolkit supporting 6 platforms: Claude Code, Cursor, Codex, OpenCode, Gemini CLI, and OpenClaw. It contains 8 skills covering the full lifecycle of bundle-plugin development (design, scaffold, author, audit, test, optimize, release). The project itself is a bundle-plugin — it uses its own patterns to build and validate itself. Requires Python 3.9+ (scripts use pathlib.Path.is_relative_to and other 3.9+ features). Test suites: test_scripts (audit/release CLI scripts), test_integration (project structure, hooks, version sync, skill discovery), test_graph_fixtures (dependency…

  • Reads credentials

The file

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

11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    Test suites: test_scripts (audit/release CLI scripts), test_integration (project structure, hooks, version sync, skill discovery), …

    line 23
  2. Distinctive:

    Descriptions: must start with "Use when..." and describe triggering conditions, not workflow steps

    line 96
  3. Very specific:

    Cross-references: use bundles-forge:<skill-name> format

    line 99
  4. Very specific:

    Version bumps: never edit version numbers manually — use bump_version.py

    line 100
  5. Very specific:

    Pre-commit: run bundles-forge bump-version --check to detect version drift

    line 101
  6. Very specific:

    Pre-commit: run bundles-forge checklists --check to detect checklist drift

    line 102
  7. Very specific:

    Pre-release: run bundles-forge:auditing for full quality + security check

    line 103
  8. Very specific:

    Pre-release: run bundles-forge audit-docs to verify documentation consistency (9 checks: D1-D9)

    line 104
  9. Very specific:

    Documentation: every guide in docs/ has a .zh.md Chinese translation that must stay in sync.

    line 106
  10. Very specific:

    No network calls (curl, wget) in hook scripts

    line 111
  11. Very specific:

    No references to sensitive files (.env, .ssh/) in SKILL.md instructions

    line 112

≈ “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.

Project Overview

Bundles Forge is a bundle-plugin engineering toolkit supporting 6 platforms: Claude Code, Cursor, Codex, OpenCode, Gemini CLI, and OpenClaw. It contains 8 skills covering the full lifecycle of bundle-plugin development (design, scaffold, author, audit, test, optimize, release). The project itself is a bundle-plugin — it uses its own patterns to build and validate itself.

Requires Python 3.9+ (scripts use pathlib.Path.is_relative_to and other 3.9+ features).

Commands

Testing

python tests/run_all.py                            # all 6 test suites (scripts, integration, graph fixtures, unit, skill quality, workflow chains)
python tests/test_scripts.py -v                    # auditing/releasing script tests (unittest)
python tests/test_integration.py -v                # structure, hooks, version sync, skill discovery
python -m pytest tests/test_scripts.py -v          # same, via pytest
python -m pytest tests/test_scripts.py -v -k test_project_mode_runs_without_error  # single test

Test suites: test_scripts (audit/release CLI scripts), test_integration (project structure, hooks, version sync, skill discovery), test_graph_fixtures (dependency graph fixtures), test_unit (unit tests), test_skill_quality (description format, cross-references, Integration symmetry), test_workflow_chains (live project workflow integrity, Calls/Called-by symmetry, graph connectivity). All 6 are collected by tests/run_all.py.

Quality & Security

bundles-forge audit-skill [target-dir]       # project-level skill quality audit (auto-detects mode)
bundles-forge audit-skill [skill-dir]          # single skill audit (4 categories)
bundles-forge audit-skill --all [target-dir] # force project-level mode
bundles-forge audit-security [target-dir]     # 7-surface security scan
bundles-forge audit-plugin [target-dir]     # combined audit (calls audit_skill + audit_security + workflow)
bundles-forge audit-workflow [target-dir]    # workflow integration audit (W1-W11)
bundles-forge audit-docs [target-dir]        # documentation consistency (9 checks: D1-D9)
bundles-forge checklists [target-dir]        # regenerate checklist tables from audit-checks.json registry
bundles-forge checklists --check [target-dir] # detect checklist drift (exit 1 if stale)

Audit scripts accept --json for machine-readable output. Exit codes: 0 = pass, 1 = warnings, 2 = critical.

Version Management

bundles-forge bump-version --check             # detect version drift across manifests
bundles-forge bump-version --audit             # find undeclared version strings
bundles-forge bump-version <new-version>       # bump all files declared in .version-bump.json

Architecture

Directory Layout

  • bin/ — CLI dispatcher: bundles-forge (shell/Python polyglot with find_python() probe), bundles-forge.cmd (Windows CMD wrapper)
  • skills/ — 8 skill directories, each containing SKILL.md and optional references/ subdirectory
  • agents/ — 3 subagent definitions (inspector, auditor, evaluator) as .md files
  • hooks/ — session bootstrap (session-start Bash script + run-hook.cmd polyglot wrapper emit lightweight skill-list prompt); openclaw-bootstrap/ contains the OpenClaw hook-pack (HOOK.md + handler.js)
  • docs/ — guides (concepts, blueprinting, scaffolding, authoring, auditing, optimizing, releasing) with *.zh.md Chinese translations; checked by D7
  • skills/auditing/scripts/ — audit, security scan, documentation checks, and checklist generation (shares _cli.py for argparse/exit-code patterns)
  • skills/releasing/scripts/ — version bump tooling (bump_version.py)
  • tests/ — 6 test suites run by run_all.py; fixtures in tests/fixtures/, prompt snapshots in tests/prompts/
  • examples/ — worked audit report examples
  • .github/workflows/validate-plugin.yml — CI: JSON validation, version/checklist drift, audit-skill, audit-security, audit-docs, audit-workflow, tests (Python 3.9 + 3.12 matrix)
  • .bundles-forge/ — runtime output directory (gitignored, created by skills at runtime)
    • audits/ — audit reports and script JSON baselines
    • evals/ — A/B eval and chain eval results
    • blueprints/ — design documents and inspection reports
    • repos/ — cloned/extracted external targets (GitHub URLs, zip/tar.gz archives)

Skill Architecture

Hub-and-spoke model: 3 orchestrators (blueprinting, optimizing, releasing) dispatch 4 executors (scaffolding, authoring, auditing, testing). Meta-skill using-bundles-forge provides session bootstrap. See README.md "Skills" section and AGENTS.md for details.

Session Bootstrap

hooks/session-start (Bash) runs on SessionStart via hooks/run-hook.cmd (CMD+Bash polyglot), emitting a skill-list prompt with dynamic skill discovery. Platform detection: CURSOR_PLUGIN_ROOT → Cursor, CLAUDE_PLUGIN_ROOT → Claude Code, COPILOT_CLI/fallback → SDK standard. Hook configs: hooks/hooks.json (Claude Code), hooks/hooks-cursor.json (Cursor), hooks/openclaw-bootstrap/ (OpenClaw).

Agent Dispatch

3 read-only subagents in agents/: inspector (scaffolding), auditor (auditing), evaluator (optimizing/auditing). Each agent file is self-contained; skills fall back to reading agent files inline when subagents are unavailable. See AGENTS.md.

Platform Manifests

Version synchronized across manifests declared in .version-bump.json. Run bundles-forge bump-version --check to detect drift.

PlatformManifestVersion-synced
npmpackage.jsonYes
Claude Code.claude-plugin/plugin.jsonYes
Claude Code (marketplace).claude-plugin/marketplace.jsonYes
Cursor.cursor-plugin/plugin.jsonYes
Gemini CLIgemini-extension.jsonYes

Key Conventions

  • Skill naming: lowercase with hyphens; directory name must match frontmatter name field
  • Descriptions: must start with "Use when..." and describe triggering conditions, not workflow steps
  • Descriptions: stay under 250 characters; total frontmatter under 1024 characters
  • Heavy reference content: extract to references/ subdirectory (threshold: 100+ lines)
  • Cross-references: use bundles-forge:<skill-name> format
  • Version bumps: never edit version numbers manually — use bump_version.py
  • Pre-commit: run bundles-forge bump-version --check to detect version drift
  • Pre-commit: run bundles-forge checklists --check to detect checklist drift
  • Pre-release: run bundles-forge:auditing for full quality + security check
  • Pre-release: run bundles-forge audit-docs to verify documentation consistency (9 checks: D1-D9)
  • Source of truth: Skills are first-class citizens — see skills/auditing/references/source-of-truth-policy.md for the full hierarchy and contradiction resolution protocol
  • Documentation: every guide in docs/ has a .zh.md Chinese translation that must stay in sync; checked by audit-docs (D7-D9)
  • Adding scripts: new CLI scripts under skills/auditing/scripts/ should import _cli.py for shared argparse setup, BundlesForgeError, and exit_by_severity() patterns

Security Rules

  • No network calls (curl, wget) in hook scripts
  • No references to sensitive files (.env, .ssh/) in SKILL.md instructions
  • No eval() or child_process in plugin code

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.