agentleFS
aishwaryajayanth1820-gitaishwaryajayanth1820-git/code_graph_agentic_observable_coding/.claude/skills/c4-design/SKILL.md

c4-design

Skill1 starsChanged 32 days agoApache-2.0View on GitHub

Orchestrator skill. Turns an approved implementation plan into a contract-first C4 design in the code graph - components, service classes, classes, interfaces, config and utility classes with HAS/DEPENDS/IMPLEMENTS/CALLS edges - plus the project's EVAL catalog, then locks the design. Use right after the user approves the project plan, or when an accepted ADR adds components or classes.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 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.

  • 2

    Very specific

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

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

    Write <project>/design/c4_design.md (for humans.

    line 13
  2. Very specific:

    Write <project>/design/c4_seed.json (for the graph.

    line 14
  3. Distinctive:

    Contract first: Before any code exists, every cross-class call has a CALLS edge with an exact signature and purpose, and every extension …

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

C4 design → code graph

Prerequisite: the user approved the implementation plan. This skill turns that plan into nodes and contracts that coder agents can build in parallel without rewrites.

Steps

  1. Set up the graph (once per project): python code_graph_tool/cg.py install <project_dir> (workspace copy). After that, always use <project_dir>/code_graph/cg.py.
  2. Decompose, following reference/decomposition-guide.md:
    • Write <project>/design/c4_design.md (for humans; template in the guide).
    • Write <project>/design/c4_seed.json (for the graph; format in .claude/skills/code-graph/reference/seed-format.md).
  3. Contract first. Before any code exists, every cross-class call has a CALLS edge with an exact signature and purpose, and every extension point is an INTERFACE with IMPLEMENTS edges for the planned implementations.
  4. Import and verify: cg import design/c4_seed.json --actor orchestrator, then cg check. The design must have zero ERRORs; resolve G03/G04 WARNs unless they are deliberate.
  5. EVALs: cg eval import .claude/skills/c4-design/reference/baseline-evals.json, then add project-specific EVALs using reference/eval-authoring.md: business invariants, the extensibility claims, and the non-functional requirements.
  6. Review with the user in the UI (cg serve). Get approval, then run cg design lock --actor orchestrator.
  7. Hand over to the orchestrate-cycle skill.

Design bar

  • Platform first: reusable PLATFORM components expose extension points, and USECASE components only plug into them. PLATFORM never depends on USECASE.
  • Extensible without over-engineering: add an abstraction only at an extension point the requirement anticipates.
  • Small nodes: aim for one responsibility per class and complexity ≤ 7.

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.