agentleFS
assisjpassisjp/specflow/skills/engineering/repo-hardening/SKILL.md

repo-hardening

Skill17 starsChanged 3 months agoMITView on GitHub

Prepare a repository verification layer by adopting existing tooling, repairing requested gaps and recording scoped commands and execution policy. Use when the user asks to set up or improve lint, types, tests, hooks or CI; not as a prerequisite merely because a Specflow marker is absent.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Add a formatter, linter, type checker or test runner only where it contributes to this repo's requested verification.

    line 22
  2. Distinctive:

    Do not format the whole repo as an incidental step.

    line 25
  3. Distinctive:

    Do not hide failures with disabled rules or blanket ignores.

    line 26

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Repo Hardening

Prepare the verification layer the repository actually needs. Adopt healthy existing tooling, repair relevant gaps, and record the commands and execution environment. User instructions and repository policy take precedence over these defaults (ADR 0009).

1. Inventory before changing anything

Inspect manifests, scripts, CI, formatter/linter/types/test configuration, hook managers, applicable AGENTS.md/CLAUDE.md, and the dirty tree. Detect the run command only if a runnable surface needs verification. In a monorepo, infer scope from the request and affected consumers; ask only when a consequential scope choice remains unresolved.

Run existing checks only in the authorized environment and within the agreed resource budget. Local execution, browser access, remote access and production operations are separate capabilities: a request to prepare a repo does not grant all of them. If execution is unavailable, inventory the commands and clearly report that their health is unverified.

2. Choose the smallest useful change

Report what is healthy, what fails, and what is missing. Reuse decisions and authorization already given. Ask before material unrequested policy/dependency changes or broad formatting; do not ask again for the same approved scope.

  • Adopt existing config and the existing hook manager; never silently replace them or install a second manager.
  • Add a formatter, linter, type checker or test runner only where it contributes to this repo's requested verification. One tool may cover several roles.
  • Respect the repository's enforcement policy. Hooks and CI are options with different costs, not a mandatory pair for every repo. Reuse existing jobs and hooks; an authorized adjustment may modify them instead of adding duplicate jobs.
  • Hooks and CI should enforce the same relevant contracts, but may use different scopes: quick staged-file checks, affected-package checks, and a broader release gate need not be identical commands.
  • Do not format the whole repo as an incidental step. If explicitly wanted, keep that mechanical change separate.
  • Do not hide failures with disabled rules or blanket ignores. Existing debt may use a documented tool-supported baseline or a clearly bounded scope, without claiming a full green gate. Fix new failures in the affected scope; report unrelated debt separately.

3. Record the project contract

Prefer an existing AGENTS.md, otherwise an existing CLAUDE.md, otherwise create AGENTS.md. If both exist, keep one canonical block and a pointer in the other (ADR 0003). Edit only your <!-- repo-hardening:start --> / :end --> region, or append it if absent. Preserve project-specific restrictions and work by others. Do not overwrite a customized block with generic defaults.

The block is a concise project contract, not a mandatory Specflow installation marker. Discover commands from the repo's scripts and CI, not from global examples. Use this shape, omitting inapplicable commands:

<!-- repo-hardening:start -->
## Verification

- Environment: <local / CI / isolated remote checkout; authorization and resource limits>
- Format: <command and scope>
- Lint: <command and scope>
- Types: <command and affected consumers>
- Tests: <focused regression command; broader gate when warranted>
- Run/evidence: <authorized command or existing evidence source; n/a when inapplicable>
- Full gate: <optional command; when it is required>

Run checks required by the change and affected consumers. Documentation-only work
normally needs diff/link review, not application suites. Reuse passing results
for unchanged source, dependencies and relevant environment; report each check's
scope and any check not run. A build or deployment is a separate result.
Do not bypass required hooks. Do not disable checks or weaken assertions to hide a failure.
Existing tests may change for an accepted behavior change or an incorrect/coupled
test; explain why and preserve the still-required behavioral coverage.
After a failure, diagnose before retrying. Repeat only with a changed hypothesis,
input or environment. Expected TDD reds are not repair failures. If the same
cause repeats without progress, report the obstacle and continue independent work;
respect any explicit project attempt or resource budget.
<!-- repo-hardening:end -->

Old blocks remain valid project policy until an authorized migration. Updating the plugin does not rewrite them. Present the scoped policy diff when migrating; do not silently relax local release limits, security gates or execution restrictions.

4. Verify and deliver

Format the files you changed with the adopted formatter in the permitted environment. Run checks affected by the tooling/policy change; verify a hook or run command when that behavior changed and execution is authorized. Do not repeatedly run a green full suite for unchanged inputs.

Keep hardening separate from feature work. Stage only your paths, and commit/publish according to the task's delivery authorization and repo conventions. Preserve pre-existing dirty files. Report installed/adopted tooling, exact checks and environment, what remains unverified, and any required next action. A missing capability is a concrete limitation, not a reason to invent a green result.

Download now (ZIP)

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. gabrieldabbah/genesis★ 4same name
    2. edloidas/skills★ 2same name
    3. davisbuilds/dojo★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository14 other files it gives its agents.

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.