agentleFS
attilaszaszattilaszasz/sdd-pilot/.github/skills/implementation-standards/SKILL.md

implementation-standards

Skill98 starsChanged 24 days agoMITView on GitHub

Reference material with coding standards (defensive coding, error handling, testing patterns). Loaded on demand by the Developer sub-agent (`.github/agents/_developer.md`); not directly invokable.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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. Distinctive:

    Fail Fast: Check preconditions immediately.

    line 12
  2. Very specific:

    Null Safety: Avoid returning null. Use Option types or explicit "Not Found" errors.

    line 13
  3. Very specific:

    No Silent Failures: No empty catch blocks.

    line 18
  4. Distinctive:

    External Dependencies: Always mock 3rd party APIs in unit tests.

    line 21
  5. Distinctive:

    When context budget is tight (late in long implementation runs):

    line 51
  6. Distinctive:

    Before confirming task "Complete":

    line 57

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

Implementation Standards

Core Coding Principles

1. Defensive Coding

  • Input Validation: Validate at entry point (Controller/API). Never trust user input.
  • Fail Fast: Check preconditions immediately. Throw specific errors, not generic 500s.
  • Null Safety: Avoid returning null. Use Option types or explicit "Not Found" errors.

2. Error Handling

  • Structured Errors: Standard format (Code, Message, Details).
  • Log Context: Log stack trace AND input parameters on catch.
  • No Silent Failures: No empty catch blocks.

3. Testing Mocks

  • External Dependencies: Always mock 3rd party APIs in unit tests.
  • Determinism: Tests must run without network access.

Common Patterns

Repository Pattern (Data Access)

interface UserRepository {
  findById(id: string): Promise<User | null>
  save(user: User): Promise<User>
}

Service Layer (Business Logic)

Contains all domain rules. Never access DB directly from Controller.

class UserService {
  constructor(repo: UserRepository)
  
  async register(email: string) {
    if (await this.repo.findByEmail(email)) {
      throw new DuplicateEmailError()
    }
    // ... logic
  }
}

Context-Window Efficiency

When context budget is tight (late in long implementation runs):

  • Targeted reads: re-read specific sections, not entire files.
  • Defer optional docs: load data-model.md and contracts/ only when current task references them.
  • Summarize: reference earlier findings by key point, don't re-include full content.

Review Checklist for Agents

Before confirming task "Complete":

  1. Compiles/runs? (No syntax errors)
  2. Imports clean? (No unused imports)
  3. Types explicit? (No any or var if avoidable)
  4. Comments helpful? (Explain "Why", not "What")

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.