new-class
Skill1 starsChanged 7 months agoMITView on GitHub
Scaffold a new class in the project: generate the source file, the test classes, update BACKLOG.md and ARCHITECTURE.md, and run a static analysis. Use this skill whenever the user asks to create, implement, or scaffold a new data structure or class — even if they just say "let's add X" or "I want to start working on Y".
In this repository12 other files it gives its agents.
- api-consistency-checkSkill
- architecture-drift-checkSkill
- design-reviewSkill
- jml-completeness-checkSkill
- jml-conformance-checkSkill
- jml-designSkill
- jml-test-generationSkill
- refactor-classSkill
- static-analysisSkill
- test-coverage-reviewSkill
- update-backlogSkill
- update-readmeSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Read the following files in full:
- Very specific: line 27
Follow the order defined in .dev/WORKFLOW.md:
- Very specific: line 30
Write production code (then run static-analysis)
- Distinctive: line 31
Write tests (black-box first, then white-box)
- Very specific: line 32
Update README.md (run update-readme)
- Distinctive: line 36
Ask the user — or infer from context — the following:
- Distinctive: line 47
Do not proceed to code until the design is clear.
- Distinctive: line 68
No knowledge of internal implementation
- Distinctive: line 70
Must be writable without reading the source code
- Very specific: line 82
After generating the source file, apply the static-analysis skill to the produced code.
- Distinctive: line 87
Add a new section for the class with:
≈ “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.
Files
New Class
Before writing any code
Read the following files in full:
.dev/WORKFLOW.md— the required order of operations; follow it strictly.dev/standards/— coding standards for the project's language.dev/design/ARCHITECTURE.md— existing design decisions and rationale.dev/backlog/BACKLOG.md— pending tasks; check if this class is already listed
Procedure
Follow the order defined in .dev/WORKFLOW.md:
- Update
ARCHITECTURE.md - Update
BACKLOG.md - Write production code (then run
static-analysis) - Write tests (black-box first, then white-box)
- Update
README.md(runupdate-readme)
1. Clarify the design (before coding)
Ask the user — or infer from context — the following:
- What is the core data structure and its invariant?
- Does it implement an existing interface? If so, which abstract base class should it extend?
- Is a thread-safe variant needed alongside an unsynchronized one?
- What are the key operations and their expected complexity?
- Are there configurable strategies or behaviours?
- What design alternatives were considered and rejected? (for
ARCHITECTURE.md)
Do not proceed to code until the design is clear.
2. Generate the source file
Required structure (in order):
- File header — as defined in the project's coding standards (license, version, etc.)
- Package / module statement
- Import / dependency statements — explicit, sorted, no wildcards
- Class documentation — describe the data structure, its invariant, complexity, thread-safety, and any non-obvious contracts
- Class declaration — extends the appropriate base class if applicable
- Body — in order: static fields, instance fields, constructors, methods (grouped by functionality, with section separators)
3. Generate the test classes
Black-box test
- Tests based solely on the public contract and documentation
- No knowledge of internal implementation
- Cover: nominal case, boundary cases, error cases (expected exceptions)
- Must be writable without reading the source code
White-box test
- Tests targeting technically risky internal areas
- Each test must have a comment explaining why it targets that specific point (e.g. hash collision, resize boundary, lock ordering)
- Cover: internal structure consistency, algorithmic edge cases, concurrent modification if applicable
4. Run static analysis
After generating the source file, apply the static-analysis skill to the
produced code. Report all findings before proceeding.
5. Update ARCHITECTURE.md
Add a new section for the class with:
- The key design decisions made
- Alternatives considered and reasons for rejection
- Any invariants that future contributors must preserve
6. Update BACKLOG.md
Add a new section for the class with:
[ ] Create black-box test(if not yet written)[ ] Create white-box test(if not yet written)- Any known limitations or future tasks discovered during design
- Move completed items to
### Doneunder the class name
Checklist before handing off
- File header present and version matches the build file
- All imports explicit and sorted
- All public methods have documentation with parameters, return values, and exceptions
- Nullable return types handled according to project standards
- Abstract base class extended where available
- Overrides of inherited methods documented if semantics differ
- Static analysis run and findings reported
ARCHITECTURE.mdupdatedBACKLOG.mdupdated
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
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.

