Agent skill

Refactor Agents Md

by vinta in vinta/hal-9000

A skill your agent uses when about to refactor or refine a user-level or project-level AGENTS.md

MITAuto-check passedAgent Workflows

Install Refactor Agents Md

skills CLI
$ npx skills add vinta/hal-9000 --skill refactor-agents-md -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vinta/hal-9000 refactor-agents-md --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vinta/hal-9000.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/refactor-agents-md .claude/skills/refactor-agents-md && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
refactor-agents-md
GitHub stars
138
Token cost
~1.8k tokens
SKILL.md length
953 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when about to refactor or refine a user-level or project-level AGENTS.md

  • Works in 5 steps: Pick the target. Use the target named by… → Consult relevant guidance. Reuse current… → Audit. Match the audit to the request.… → …
  • About to refactor
  • SKILL.md covers Instructions and GPT-6 checks
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Refactor Agents Md is an agent skill from vinta/hal-9000. Use when about to refactor or refine a user-level or project-level AGENTS.md

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Agent Workflows, covering Refactoring and Agent instruction files. The repository describes itself as: Opinionated AI coding agent and dev environment automation for macOS. The licence is MIT.

When your agent uses it

  • About to refactor
  • Refine a user-level
  • Project-level AGENTS.md

Example prompts

  • “/refactor-agents-md”

Requirements

  • Pre-approved tools (allowed-tools): WebFetch, Read(~/.codex/AGENTS.md)

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Pick the target. Use the target named by the invocation or established in the conversation. If the target remains ambiguous, ask the user…
  2. Consult relevant guidance. Reuse current guidance already fetched in the conversation; fetch missing sections needed for the audit…
  3. Audit. Match the audit to the request. Read the target and applicable broader AGENTS.md files, then follow references needed to assess…
  4. Resolve decisions. For an assessment, report findings without editing. For an authorized refactor or edit, carry the requested changes…
  5. Rewrite and verify. Apply only authorized changes. Search references before removing or moving guidance, and update affected pointers…

What it can do on your machine

Read from SKILL.md and the folder at commit 0a2005a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • WebFetch
    • Read(~/.codex/AGENTS.md)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.openai.com
    • learn.chatgpt.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Refactor Agents Md loads about 1.8k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 953 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vinta/hal-9000 at commit 0a2005a, republished under its MIT licence (© vinta). 953 words, ~1,798 tokens.

Download SKILL.mdSave it as .claude/skills/refactor-agents-md/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
refactor-agents-md
description
Use when about to refactor or refine a user-level or project-level AGENTS.md
allowed-tools
WebFetch, Read(~/.codex/AGENTS.md)

Refactor AGENTS.md

Refactor an AGENTS.md for GPT-6 Astra. Every retained line enters each Codex session in its scope, so it must earn that attention. Move narrower guidance to the closest applicable scope or a reusable skill, and remove instructions that do not change behavior. Preserve the user's intended behavior and existing authorization.

Instructions

Use request_user_input in Codex when available.

  1. Pick the target. Use the target named by the invocation or established in the conversation. If the target remains ambiguous, ask the user to choose among the files that exist:

    • The user-level file at $CODEX_HOME/AGENTS.md, defaulting to ~/.codex/AGENTS.md when CODEX_HOME is unset.
    • The current project's root AGENTS.md.
    • Any nested AGENTS.md on the path from the project root to the current working directory.
  2. Consult relevant guidance. Reuse current guidance already fetched in the conversation; fetch missing sections needed for the audit. Preserve explicit user choices where the guides offer defaults. If a source is unavailable, disclose the gap and continue with available evidence.

  3. Audit. Match the audit to the request. Read the target and applicable broader AGENTS.md files, then follow references needed to assess scope, conflicts, or claimed redundancy. Treat referenced workflows as audit material. For a full audit or refactor, cover every instruction; for a targeted edit, cover the affected instructions and their interactions. Check repository evidence before declaring a rule stale or derivable. Finish when every instruction in scope has exactly one verdict against the target's bar and GPT-6 checks below.

    • contradiction: conflicts with another applicable instruction. Record both instructions and their source files; resolve conflicts from instruction priority and explicit user intent where possible.
    • delete: fails the no-op test because the models that use the target file would behave the same without it. This includes redundant defaults, vague directions, and platitudes such as "write clean code." Cite the evidence or rationale; retain an explicit constraint when its redundancy is uncertain.
    • demote: changes behavior but applies only to a narrower directory or task. Choose and name its destination. Put directory-specific guidance in the closest nested AGENTS.md; put a multi-step task workflow in a skill; put reference material in a linked document.
    • rewrite: has the right scope and meaning, but its phrasing falls short of the fetched prompting guidance. Also a rewrite when the line carries words that fail the no-op test on their own: a duplicate of another line, a definition of a term the model knows, or emphasis; a rationale or example stays, since both steer the model.
    • keep: earns its always-loaded cost as written.

    Apply the bar for the target:

    • User-level: a keep must express a preference or constraint across projects. Conditional tool and environment rules qualify when their trigger can recur across projects. Demote project or directory guidance to the applicable project's AGENTS.md, and detailed task workflows to skills with reliable triggers.
    • Project or nested: a keep must govern the target directory's subtree; conditional rules belong here when their trigger can occur throughout that scope. Keep concise project context, commands Codex would otherwise guess wrong, domain concepts, constraints, and gotchas that are not obvious from the repository. Delete restatements of the code and volatile inventories such as file trees. Demote narrower guidance to a closer nested AGENTS.md, a linked document, or a skill.
  4. Resolve decisions. For an assessment, report findings without editing. For an authorized refactor or edit, carry the requested changes through verification using decisions already established in the conversation. Preserve explicit review boundaries; ask only about unresolved contradictions or behavior changes outside the authorized scope. Prepare the proposed rewrite and affected delete or demote lists, including destinations, before asking. Use request_user_input when available and permitted; otherwise ask one concise question. Continue independent work while decisions are pending.

  5. Rewrite and verify. Apply only authorized changes. Search references before removing or moving guidance, and update affected pointers. Place each new nested AGENTS.md in the nearest directory whose whole subtree shares its guidance. Check the final diff for preserved intent, resolved conflicts, and reachable destinations. Finish when every audited instruction is accounted for and required checks pass; report changed files and any unresolved decisions concisely.

Show full SKILL.md (251 more words)Show less

GPT-6 checks

Apply these checks to existing instructions; add guidance only where the user's workflow needs it.

  • Model audience: Judge redundant defaults against the models that use the target file. Preserve guidance needed by other supported models; Astra's defaults alone do not establish that a shared rule is unnecessary.
  • Reading scope: Replace unconditional document-reading requirements with pointers naming the tasks that need each document. Keep exhaustive reading for audits that require full coverage.
  • Initiative: Replace unnecessary approval gates with clear authority and stopping conditions. Complete authorized work, use context for routine choices, and prepare a reviewable result before any required approval. Preserve deliberate approval boundaries.
  • Instruction priority: Make explicit that user instructions take precedence over skill guidelines within higher-priority constraints. Audit vague rules that could silently stop or redirect work. When a skill causes a pause or deviation, require its exact path, relevant quote, and explanation distinguishing the rule from the agent's interpretation.
  • Writing: State the desired length and structure directly. Prefer concise prose and useful technical detail; reserve lists and tables for information they clarify. Remove overlapping style rules and stock phrasing prescriptions that add no value.
  • Delegation: State when subagents help and any limits when the workflow uses them. Preserve tool availability and explicit delegation preferences; the guide's example is not a blanket requirement to delegate every task.
  • Verification: Match checks to the change and complete mandatory checks. Broaden or repeat testing only for new changes, failures, or unresolved concerns. Avoid requiring new tests that merely restate low-impact edits.

© vinta, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/refactor-agents-md of vinta/hal-9000.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 0a2005a

Compare with similar skills

Refactor Agents Md next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Refactor Agents Md compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactor Agents Md this skillvinta/hal-9000138—~1.8kAutomated safety check: PassMIT
Docslatitude-dev/latitude-llm4.7k—~2.5kAutomated safety check: PassMIT
Agent Md Refactormicronaut-projects/micronaut-openapi114—~766Automated safety check: PassApache-2.0
Steadyagent WorkflowKhalilzhang0825/boring-is-all-you-need173—~1kAutomated safety check: PassMIT
Reclaudebrianlovin/agent-config3751 repos~981Automated safety check: PassNone
Agent Md Refactormeshery/meshery-operator1515 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Docs

    latitude-dev/latitude-llm

    Review the current conversation context and git changes, then persist durable repository knowledge into dev-docs/.md by domain and into AGENTS.md for cross-cutting repo rules.

    4.7k GitHub stars~2.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Agent Md Refactor

    micronaut-projects/micronaut-openapi

    Refactor oversized agent instruction files into a progressive-disclosure structure.

    114 GitHub stars~766 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Steadyagent Workflow

    Khalilzhang0825/boring-is-all-you-need

    Local-first Codex workflow for planning, debugging, reviewing, refactoring, improving AGENTS.md, building skills, publishing agent harness repositories, or running complex multi-step coding tasks…

    173 GitHub stars~1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Reclaude

    brianlovin/agent-config

    Refactor CLAUDE.md files to follow progressive disclosure principles.

    375 GitHub starsUsed in 1 repo~981 tokens
    Agent WorkflowsAuto-check passed
  • Agent Md Refactor

    meshery/meshery-operator

    Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles.

    151 GitHub starsUsed in 5 repos~1.9k tokens
    Agent WorkflowsAuto-check passed
  • Agents Md Mapper

    alchemiststudiosDOTai/harness-engineering

    This skill should be used when creating, refreshing, or validating a repository AGENTS.md so it stays concise, current, and grounded in repository evidence.

    105 GitHub stars~1.8k tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed

More from vinta/hal-9000

All 15 skills in this repo
  • Finds which plugins in the repository changed, bumps only the ones not already bumped since origin/main, and checks that each plugin's two manifests stay in sync.

    138 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Audits your Claude Code settings and environment variables against the current official docs and returns a ranked list of changes tied to how you actually work.

    138 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Logical Git Commits

    vinta/hal-9000

    Commits everything in the working tree as one logical change per commit, splitting files by hunk, with bodies that say what was wrong before and never an invented reason.

    138 GitHub stars~3.1k tokensUpdated 2 days ago
    Auto-check passed
  • PR

    vinta/hal-9000

    A skill your agent uses when the user explicitly asks to push the current branch and open a PR, rewrite an open PR's body from its commits, or wait for CI and merge it

    138 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Keeps Ansible install tasks in line with upstream docs by fixing version, install-method and link drift one tool at a time, with a commit for each.

    138 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Rewrites docs, READMEs, issues, comments or UI text in plain Global English that translates well and still sounds native, keeping every fact intact.

    138 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Refactor Agents Md

What does Refactor Agents Md do?

A skill your agent uses when about to refactor or refine a user-level or project-level AGENTS.md. Refactor Agents Md is an agent skill from vinta/hal-9000.

When should I use Refactor Agents Md?

Refactor Agents Md fits situations like: about to refactor; refine a user-level; project-level AGENTS.md.

How do I install Refactor Agents Md in Claude Code?

Run `npx skills add vinta/hal-9000 --skill refactor-agents-md -a claude-code`. Or copy the skill folder (skills/refactor-agents-md in vinta/hal-9000) into .claude/skills/refactor-agents-md in your project. Claude Code loads it when a task matches its description.

How do I install Refactor Agents Md in Codex?

Run `npx skills add vinta/hal-9000 --skill refactor-agents-md -a codex`. Or copy the skill folder (skills/refactor-agents-md in vinta/hal-9000) into .agents/skills/refactor-agents-md in your project. Codex loads it when a task matches its description.

Can I use Refactor Agents Md in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinta/hal-9000 --skill refactor-agents-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor-agents-md, .gemini/skills/refactor-agents-md, .github/skills/refactor-agents-md and .opencode/skills/refactor-agents-md in your project.

What does Refactor Agents Md need to run?

SKILL.md names no scripts, command-line tools or credentials: Refactor Agents Md is instructions for the agent only. Its frontmatter pre-approves these tools: WebFetch, Read(~/.codex/AGENTS.md).

Does Refactor Agents Md access the network?

SKILL.md names 2 domains. As links in the text: developers.openai.com and learn.chatgpt.com. This is read from the text; nothing was executed.

Is Refactor Agents Md safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Refactor Agents Md use?

Refactor Agents Md is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Refactor Agents Md use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Refactor Agents Md?

Skills that share tags, products or a category with Refactor Agents Md: Docs (latitude-dev/latitude-llm, 4.7k stars), Agent Md Refactor (micronaut-projects/micronaut-openapi, 114 stars), Steadyagent Workflow (Khalilzhang0825/boring-is-all-you-need, 173 stars) and Reclaude (brianlovin/agent-config, 375 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactor Agents Md?

vinta (a GitHub user) maintains it in vinta/hal-9000, which has 138 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 5, 2026.

Source: vinta/hal-9000 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.