Skip to content

Create skills registry in AGENTS.md with validation hook#1532

Merged
nathanjmcdougall merged 8 commits intomainfrom
copilot/create-skills-registry-in-agents-md
Mar 25, 2026
Merged

Create skills registry in AGENTS.md with validation hook#1532
nathanjmcdougall merged 8 commits intomainfrom
copilot/create-skills-registry-in-agents-md

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Agents were ignoring available skills because AGENTS.md didn't enumerate them. Added a skills registry and a prek hook to keep it from rotting.

  • AGENTS.md: Added a skills registry table listing all 17 skills with descriptions. Fixed .agent/skills.agents/skills typo.
  • hooks/check-skills-documented.py: Python script following the usethis-prek-hook-bespoke-create skill conventions that fails if any .agents/skills/*/ directory name isn't mentioned in AGENTS.md. Uses pure Python with pathlib, errors to stderr, success to stdout.
  • .pre-commit-config.yaml: Wired up the hook as a local prek hook at priority 0 via uv run --frozen --offline.
  • pyproject.toml: Added lint.per-file-ignores."hooks/**" = [ "D", "INP001" ] to disable docstring and implicit namespace package ruff rules for hook scripts.

When a new skill is added without updating AGENTS.md, the hook produces:

ERROR: The following skills are not mentioned in AGENTS.md:
  - my-new-skill

Please add them to the skills registry in AGENTS.md.
Original prompt

This section details on the original issue you should resolve

<issue_title>Create a skills registry in AGENTS.md</issue_title>
<issue_description>In #1528, the agent seems to completely ignore relevant skills. It's time to build a skills registry list into AGENTS.md.

To avoid it rotting, we should add a ./hooks directory at the root level where we add short hook scripts, which we set up to run via prek.

The hook should check that all skills (based on their names) are mentioned in the AGENTS.md file.</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 25, 2026 03:55
- Update AGENTS.md with a complete skills registry table listing all
  skills and their descriptions
- Create hooks/check-skills-documented script that verifies all skill
  directory names in .agents/skills/ are mentioned in AGENTS.md
- Add check-skills-documented as a local prek hook in
  .pre-commit-config.yaml at priority 0

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/8968f481-6345-4852-af05-448495a66340
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/8968f481-6345-4852-af05-448495a66340
Copilot AI changed the title [WIP] Add skills registry to AGENTS.md with validation hook Create skills registry in AGENTS.md with validation hook Mar 25, 2026
Copilot AI requested a review from nathanjmcdougall March 25, 2026 03:59
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd want this in Python, not bash.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please re-write according to the priciples in the usethis-prek-hook-bespoke-create skill

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrote as a Python script following the usethis-prek-hook-bespoke-create skill conventions: pure Python with pathlib, errors to stderr, success to stdout, raise SystemExit(main()) pattern, and wired via uv run --frozen --offline. Also added 2 newly-created skills (usethis-prek-hook-bespoke-create, usethis-python-functions) to the registry. See commit ee508ba.

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

@copilot There's been a couple of new skills added onto main since you worked on this, please add them to pass the static checks.

- Replace bash script with Python script (hooks/check-skills-documented.py)
- Follow usethis-prek-hook-bespoke-create skill conventions: pure Python,
  errors to stderr, success to stdout, raise SystemExit
- Update .pre-commit-config.yaml entry to use uv run --frozen --offline
- Add two newly-created skills to the registry: usethis-prek-hook-bespoke-create
  and usethis-python-functions

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/0911b302-1e44-4ea9-8b34-d57ad7e0e2f9
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/create-skills-registry-in-agents-md (3659f72) with main (398ff8d)

Open in CodSpeed

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 25, 2026

@copilot There's been a couple of new skills added onto main since you worked on this, please add them to pass the static checks.

Both usethis-prek-hook-bespoke-create and usethis-python-functions were already added to the registry in ee508ba. The CI failure was from commit 54a5d78 (prior to the fix). The CI runs for ee508ba are showing action_required (pending approval), which is why they haven't shown as passing yet.

@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 20:31
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

@copilot Please disable INP001 and D rule codes in ruff config

Copilot AI and others added 2 commits March 25, 2026 21:13
…ffected-find to registry, merge main

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/bc26d8b8-cf79-44f7-a8e3-a1f6770b64c4
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 25, 2026

@copilot Please disable INP001 and D rule codes in ruff config

Added lint.per-file-ignores."hooks/**" = [ "D", "INP001" ] to pyproject.toml. Also merged main and added the new usethis-python-test-affected-find skill to the registry. All static checks pass. See commit 3659f72.

Copilot AI requested a review from nathanjmcdougall March 25, 2026 21:16
@nathanjmcdougall nathanjmcdougall merged commit c71af38 into main Mar 25, 2026
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/create-skills-registry-in-agents-md branch March 25, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a skills registry in AGENTS.md

2 participants