agentleFS
alvaroofernaandezalvaroofernaandez/dotfiles/skills/readme-guardian/SKILL.md

readme-guardian

Skill5 starsChanged 4 days agoMITView on GitHub

Ensures the README.md is always up-to-date before pushing changes to GitHub. Automatically detects new features, dependencies, scripts, config changes, and architectural modifications, then updates the README accordingly. Trigger: PROACTIVELY before any git push, PR creation, or when user asks to update docs.

  • Reads credentials
  • Commits and pushes

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, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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:

    Before pushing or creating a PR, run this checklist:

    line 36
  2. Distinctive:

    Test config → Update testing section

    line 101
  3. Distinctive:

    Update metrics: if they changed significantly (file counts, component counts, etc.)

    line 123
  4. Distinctive:

    After significant changes, recount:

    line 148
  5. Distinctive:

    Test additions that don't change coverage thresholds

    line 201
  6. Distinctive:

    Add this to the project or global CLAUDE.md skills table:

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Skill: readme-guardian

When to Activate

This skill MUST activate PROACTIVELY (without being asked) in these scenarios:

  1. Before any git push — check if README needs updating
  2. Before creating a PR — ensure README reflects the changes in the PR
  3. After completing a feature/fix that changes architecture, dependencies, scripts, or config
  4. When the user explicitly asks to update docs, README, or documentation

Core Principle

The README is the first thing a new team member reads. If it's outdated, it's worse than having no README at all — it actively misleads. Every push to a shared repository MUST leave the README accurate.


Pre-Push Checklist

Before pushing or creating a PR, run this checklist:

1. Dependency Changes

git diff HEAD~1..HEAD -- package.json pnpm-lock.yaml yarn.lock | head -100

Check for:

  • New dependencies added → Add to tech stack table
  • Major version bumps → Update version numbers
  • Removed dependencies → Remove from README
  • New dev tools → Add to relevant section

2. Script Changes

git diff HEAD~1..HEAD -- package.json | grep '"scripts"' -A 50

Check for:

  • New scripts → Add to scripts table
  • Renamed scripts → Update references
  • Removed scripts → Remove from table

3. Environment Variable Changes

git diff HEAD~1..HEAD -- .env.example src/lib/env.ts

Check for:

  • New env vars → Add to env vars table with description
  • Removed env vars → Remove from table
  • Changed defaults → Update documentation

4. Architectural Changes

# New directories
git diff HEAD~1..HEAD --stat | grep -E '^\s*src/.*/' | head -20

# New route groups
git diff HEAD~1..HEAD --stat | grep 'app/' | head -20

# New components/hooks
git diff HEAD~1..HEAD --stat | grep -E '(components|hooks)/' | head -20

Check for:

  • New directories or modules → Update project structure tree
  • New route groups → Update routing section
  • New component categories → Update component organization
  • New hooks → Update hooks listing

5. Configuration Changes

git diff HEAD~1..HEAD -- next.config.ts Dockerfile docker-compose.yml .github/workflows/ vitest.config.ts playwright.config.ts tsconfig.json

Check for:

  • Docker changes → Update Docker section
  • CI changes → Update CI/CD section
  • Build config → Update relevant sections
  • Test config → Update testing section

6. Security Changes

git diff HEAD~1..HEAD -- src/lib/security.ts src/lib/sanitize.ts src/lib/validation/ next.config.ts | grep -E '(CSP|header|security|validation)' | head -20

Check for:

  • New security headers → Update security table
  • New validation schemas → Mention in security section
  • CSP changes → Update security section

How to Update

Rules

  1. Match the existing style — read the current README first, maintain tone, formatting, emoji usage
  2. Only update what changed — do NOT rewrite sections that are already accurate
  3. Keep it in Spanish neutro — professional, no regional slang, no informal expressions
  4. Update metrics if they changed significantly (file counts, component counts, etc.)
  5. Mermaid diagrams — update if the architecture, flow, or pipeline changed
  6. Tables — keep them aligned and complete
  7. Do NOT add fluff — every line must be useful to a developer joining the team

What to Update (by change type)

Change TypeREADME Sections to Update
New dependencyStack tecnológico table
New scriptScripts disponibles table
New env varVariables de entorno tables
New component dirEstructura del proyecto tree
New hookEstructura del proyecto tree, hooks count in metrics
Architecture changeArquitectura diagram, Flujo de datos diagram
Auth changeAutenticación section + diagram
Pipeline changePipeline de facturas section + state diagram
Docker changeDocker section
CI changeCI/CD section + diagram
Security changeSeguridad table
i18n changeInternacionalización section
Test changesTesting section, coverage targets

Metrics to Keep Current

After significant changes, recount:

# TypeScript files
find src -name "*.ts" -o -name "*.tsx" | wc -l

# Components
find src/components -name "*.tsx" | wc -l

# Hooks
find src/hooks -maxdepth 1 -name "use-*.ts" | wc -l

# Tests
find src -path "*__tests__*" -name "*.test.*" | wc -l

# Translation keys (approximate)
cat src/messages/es.json | grep -c '":"'

Anti-Patterns

  • ❌ Pushing without checking if README is still accurate
  • ❌ Adding a dependency without documenting it
  • ❌ Creating a new module/directory without updating the structure tree
  • ❌ Changing env vars without updating the table
  • ❌ Rewriting the entire README when only one section changed
  • ❌ Adding placeholder text like "TODO" or "coming soon"
  • ❌ Using regional slang or informal language
  • ❌ Outdated metrics (file counts, component counts)
  • ❌ Mermaid diagrams that no longer reflect reality

Workflow Example

User: "Sube los cambios y haz PR"

Agent thinks:
1. What files changed? → git diff --stat
2. Do any changes affect README sections? → Check against checklist
3. If YES → Update README FIRST, then commit README update, then push/PR
4. If NO → Proceed with push/PR directly

When NOT to Update

  • Typo fixes in code (no architectural impact)
  • Code refactors that don't change public API or structure
  • Test additions that don't change coverage thresholds
  • Translation key additions (unless significantly changing the count)
  • Style/CSS changes
  • Bug fixes in existing features (unless they reveal a documentation error)

Integration with CLAUDE.md

Add this to the project or global CLAUDE.md skills table:

| Pushing code, creating PRs, updating documentation | readme-guardian |

This ensures the skill activates automatically before any push or PR operation.

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.