All skills
paulrberg avatar

/agents-brain

@f417940
by Paul Bergpaulrberg/agent-skills94 stars
7

Create or polish repo agent context: README.md, AGENTS.md/CLAUDE.md, project-installed and source-catalog skills, and other Markdown context docs.

Use this Skill: https://skilld.dev/gh/paulrberg/agent-skills/agents-brain

This session only. Nothing lands on disk.

referencescreate-docs.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Create Docs Workflow

Create missing README.md and AGENTS.md context from repository evidence. Regenerate existing targets only with --force or an equally explicit overwrite instruction. Create other context docs only on explicit request. Never create skills.

Success means each selected package root has the requested human and agent context, CLAUDE.md handling matches the installed Claude Code (see Claude Code Compatibility in SKILL.md), and generated claims pass repository-defined validation.

Select Targets

Package roots are the repository root and directories containing one of these manifests:

  • package.json
  • Cargo.toml
  • pyproject.toml
  • setup.py
  • go.mod
  • foundry.toml
  • Gemfile
  • composer.json

Create README.md only at package roots. Create package-root AGENTS.md files there as well. Apply path and --root-only before analyzing targets.

Nested AGENTS.md files may also be created when the user explicitly requests broad context creation and a subtree has a distinct command runner, generated-file boundary, ownership rule, deployment or data constraint, safety requirement, or review workflow. Otherwise, report the recommendation without writing it. Never create README.md in an arbitrary leaf directory.

For each selected target, classify README.md, AGENTS.md, and CLAUDE.md as missing, reusable, safely replaceable, or blocked. Without overwrite authority, skip existing README.md and AGENTS.md files and report them; do not silently route them through polish.

Ground the Content

Derive claims from the nearest manifests and metadata, task runners, lock files, CI and lint configuration, generated-file notices, and relevant source boundaries. Use a user-provided description when present, but verify any factual claims it adds.

Do not invent project purpose, badges, links, commands, conventions, ownership, or safety rules. When evidence is missing, narrow the generated document instead of guessing.

Generate README.md

Keep README.md human-facing:

  • Add a title and short factual description.
  • Add only verified documentation, homepage, demo, package, changelog, citation, funding, reference, or license links that materially help readers.
  • Add a short contributing pointer to sibling AGENTS.md.
  • Include a short operator-run setup guide only for dotfiles, infrastructure, homelab, personal tooling, or an explicit setup request.

Do not add developer command inventories, directory trees, configuration manuals, contribution rules, marketing copy, or placeholders.

Generate AGENTS.md

Keep AGENTS.md concise, imperative, and scoped:

  • Name the stack and preferred package manager only when useful for choosing commands.
  • Include commands whose runner, order, side effects, environment, or failure behavior matters.
  • Include non-obvious architecture, style, naming, generated-file, ownership, safety, external-disclosure, credential, deployment, financial, recipient-scoped data-handling, and review constraints supported by evidence.
  • Exclude generic tool tutorials, long directory trees, and package-script inventories that add no preference or warning.

Parent files hold shared defaults; nested files contain only local deltas.

Handle CLAUDE.md

Run the version check from Claude Code Compatibility in SKILL.md. When agents_md_native=true, create no CLAUDE.md symlinks and delete any existing symlink to a sibling AGENTS.md in the selected tree. Otherwise, create a sibling compatibility symlink for each created AGENTS.md:

(cd "$dir" && ln -sfn AGENTS.md CLAUDE.md)

Write only when CLAUDE.md is missing or already a symlink. A regular CLAUDE.md blocks only that symlink target; leave it untouched and report the conflict.

Create Context Docs on Request

Create a Markdown context doc outside the default set — a conventions file, command catalog, data-format reference, or workflow runbook — only when the user explicitly names its path and purpose. Ground its content in repository evidence like any other target, keep it scoped to that purpose, and link it from the nearest AGENTS.md or README.md when that improves discoverability. Do not scan for missing context docs; at most report a recommendation without writing it.

Handle CONTRIBUTING.md

Never edit CONTRIBUTING.md. If it exists next to a target, put only stable, relevant contribution guidance in AGENTS.md and advise the user to merge any remaining useful instructions manually before deleting CONTRIBUTING.md.

Finish

Run the completion checks and use the report contract from SKILL.md. In dry-run mode, show selected paths and concise section-level previews or diffs. Stop after the requested files are created or regenerated and validated; do not polish unrelated existing context.

Source: SKILL.md on GitHub

1 warningtoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill is a well-designed context management tool for AI agents that automates the creation and maintenance of repository documentation. It includes sophisticated security guardrails to prevent execution in sensitive system directories and uses secure methods to fetch prompting guidance from official, trusted sources (OpenAI and Anthropic) with validation and integrity checks.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: MEDIUM · 1 issue

Signed by skilld at f417940. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
skill-dependencies
[
  "skill-writing"
]
Other metadata
argument-hint
<polish|create> [path] [target ...] [--root-only] [--preserve] [--minimal] [--thorough|--full] [--dry-run] [--force]
compatibility
Requires curl and a writable user cache directory; network populates or refreshes the GPT-6 Astra and Claude Opus 5.5 prompting guides.

README badge

README badge for paulrberg/agent-skills/agents-brain