agentleFS
shinprshinpr/agentic-code/.agents/skills/coding-rules/SKILL.md

coding-rules

Skill51 starsChanged 9 days agoMITView on GitHub

Applies repository-aware rules for maintainable implementation, contracts, errors, and refactoring. Use when writing or modifying code.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the repository's formatter, linter, type system, naming conventions, and representative code patterns.

    line 10
  2. Distinctive:

    Keep unrelated cleanup and optional hardening outside the change.

    line 19
  3. Distinctive:

    Remove unused code encountered inside the changed responsibility when evidence shows no current consumer remains.

    line 20
  4. Distinctive:

    Keep one coherent responsibility per function or module.

    line 25
  5. Distinctive:

    Use the language's idiomatic parameter and data-shape conventions.

    line 26
  6. Distinctive:

    Prefer simple control flow.

    line 29
  7. Distinctive:

    Avoid logging the same error at every layer.

    line 35
  8. Distinctive:

    Keep secrets, credentials, and unnecessary personal data out of logs and messages.

    line 36
  9. Distinctive:

    Add fallback behavior only when a current requirement defines the degraded result.

    line 37
  10. Distinctive:

    Keep comments timeless and remove obsolete or commented-out code.

    line 42
  11. Distinctive:

    Update documentation when an affected consumer would otherwise act on stale information.

    line 43
  12. Distinctive:

    Use resource-lifecycle and data-structure patterns appropriate to the language and repository.

    line 55
  13. Distinctive:

    Add caching, concurrency, batching, or monitoring only when a current requirement or measured problem justifies it.

    line 56

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

Development Rules

Language and Repository Rules

Use the repository's formatter, linter, type system, naming conventions, and representative code patterns. Read a language reference only when it applies:

  • TypeScript: references/typescript.md

Repository contracts and accepted design decisions take precedence over generic style preferences.

Minimal Change

  • Implement the requested outcome through existing mechanisms where sufficient.
  • Keep unrelated cleanup and optional hardening outside the change.
  • Remove unused code encountered inside the changed responsibility when evidence shows no current consumer remains.
  • Introduce an abstraction only when current callers share responsibility and change pressure.

Functions and Interfaces

  • Keep one coherent responsibility per function or module.
  • Use the language's idiomatic parameter and data-shape conventions.
  • Make external dependencies and side effects visible at the appropriate boundary.
  • Preserve public and shared contracts unless the requirements change them.
  • Prefer simple control flow; refactor complexity when it obscures behavior or error handling.

Error Handling

  • Preserve actionable error context across boundaries.
  • Convert errors only where the receiving layer needs a different contract.
  • Avoid logging the same error at every layer.
  • Keep secrets, credentials, and unnecessary personal data out of logs and messages.
  • Add fallback behavior only when a current requirement defines the degraded result.

Comments and Documentation

  • Explain non-obvious intent, constraints, or trade-offs.
  • Keep comments timeless and remove obsolete or commented-out code.
  • Update documentation when an affected consumer would otherwise act on stale information.

Refactoring

  1. Confirm the observable behavior and focused proof.
  2. Make the smallest coherent structural change.
  3. Run affected verification.
  4. Continue only when another current problem remains.

Performance and Resources

  • Measure a demonstrated bottleneck before optimizing.
  • Use resource-lifecycle and data-structure patterns appropriate to the language and repository.
  • Add caching, concurrency, batching, or monitoring only when a current requirement or measured problem justifies it.

Completion Check

  • The implementation follows representative repository patterns or documents a necessary deviation.
  • Added structure has a current consumer and purpose.
  • Errors remain observable without duplicative logging or silent fallback.
  • Applicable repository checks pass.

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.