Skip to content

fix: normalize deps skill names per agentskills.io spec#68

Merged
zachdaniel merged 2 commits intoash-project:mainfrom
phiilu:fix/agentskills-spec-compliant-frontmatter
Apr 5, 2026
Merged

fix: normalize deps skill names per agentskills.io spec#68
zachdaniel merged 2 commits intoash-project:mainfrom
phiilu:fix/agentskills-spec-compliant-frontmatter

Conversation

@phiilu
Copy link
Copy Markdown
Contributor

@phiilu phiilu commented Apr 4, 2026

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

This PR resolves #67

I considered only deps: rules to be normalized automatically. For build: and package_skills: I opted to show a warning, because those could be fixed by the user (build:) or by the maintainer of the dependency (package_skills:).

From my project:

  defp usage_rules do
    [
      skills: [
        location: ".claude/skills",
        build: [
          phoenix_framework: [
            description: "Use this skill when working with Phoenix Framework, LiveView, Ecto, or the web layer.",
            usage_rules: [:phoenix, ~r/^phoenix_/]
          ]
        ],
        deps: [:mdex, :usage_rules]
      ]
    ]
  end

would show a warning for phoenix_framework

❯ mix usage_rules.sync

Igniter - Warnings:

* Skill name 'phoenix_framework' must only contain lowercase letters, numbers, and hyphens (agentskills.io spec)

and update the usage_rules correct:

❯ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        renamed:    .claude/skills/use-usage_rules/SKILL.md -> .claude/skills/use-usage-rules/SKILL.md
        renamed:    .claude/skills/use-usage_rules/references/elixir.md -> .claude/skills/use-usage-rules/references/elixir.md
        renamed:    .claude/skills/use-usage_rules/references/otp.md -> .claude/skills/use-usage-rules/references/otp.md
        renamed:    .claude/skills/use-usage_rules/references/usage_rules.md -> .claude/skills/use-usage-rules/references/usage_rules.md
        modified:   mix.exs

Spec reference: https://agentskills.io/specification#frontmatter-required

@zachdaniel
Copy link
Copy Markdown
Contributor

The main thing we need to make sure that this does is remove any skills that used the old naming pattern. Could you add a test that shows that? i.e create an old skill using the old naming pattern w/ the old contents, and test that syncing removes that old skill? I think it will because we use frontmatter to indicate what skills we manage, but I just want to be 100% sure 😄

@phiilu
Copy link
Copy Markdown
Contributor Author

phiilu commented Apr 4, 2026

Makes sense! I will do it as soon as possible.

@phiilu phiilu force-pushed the fix/agentskills-spec-compliant-frontmatter branch from ed290c0 to 057719b Compare April 5, 2026 14:50
@phiilu
Copy link
Copy Markdown
Contributor Author

phiilu commented Apr 5, 2026

I added the requested test. Hopefully I did it like you intended it :)

@zachdaniel zachdaniel merged commit dd1ff65 into ash-project:main Apr 5, 2026
23 checks passed
@zachdaniel
Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

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.

pi coding agent strictly follows Agent Skills format which usage_rules does not enforce

2 participants