fix(skill-creator): do not hardcode author in template and docs#371
Conversation
Alan-TheGentleman
left a comment
There was a problem hiding this comment.
This looks like a focused bugfix, but the process gates need to be current.
Please add the required type:bug label, confirm the approved issue link, and refresh CI against current main.
|
@Alan-TheGentleman refreshed against current main → merge commit What changed during the rebaseMain rewrote But the rewrite reintroduced the bug in the new inline template (around line 61): metadata:
author: gentleman-programming # <- still hardcoded in mainThis PR's fix re-applies cleanly to the new template line. Net diff vs One line per file — exactly the placeholder swap. Local validationgo test ./internal/components/ -run TestGoldenSkills -vGoldens regenerated with Pending maintainer action
Architectural question from the issue #98 comment is now moot — main already handled the docs table reading. This PR is now strictly scoped to the inline template fix. Happy to extend if you want the skill-creator's own frontmatter ( |
|
@Basparin — heads-up: this PR's Unit Tests failure is Your branch still expects the old form, so the CI run uses the pre-#660 assertion and fails. Fix: rebase against current Pseudocode: git fetch upstream main
git rebase upstream/main
# resolve any conflicts (likely none for this PR's scope)
git push --force-with-leaseThe other PR you have open (and #371 + #374 + #372) all show the same failure for the same reason — same rebase fixes all three. Thanks for sticking with these. |
The SKILL.md template and the Frontmatter Fields table instructed every
generated skill to set metadata.author to 'gentleman-programming',
so skills created by any user ended up attributed to the wrong author.
Replace the template value with a '{your-github-username}' placeholder
and update the docs row to instruct the AI to infer the author from
'git config user.name' or ask the user — never hardcode.
The skill-creator's own frontmatter author is intentionally kept.
Closes Gentleman-Programming#98
6f646f7 to
b665be2
Compare
📝 WalkthroughWalkthroughThe PR updates the skill-creator template documentation to use a placeholder for the author field instead of a hardcoded example name, allowing users to substitute their own GitHub username when creating new skills. ChangesTemplate Placeholder Update
🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@Alan-TheGentleman rebaseado sobre main actual ( |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/assets/skills/skill-creator/SKILL.md (1)
53-64: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winConsider adding explicit guidance for populating the author field.
The template now correctly uses a placeholder for
metadata.author, but the document doesn't instruct the AI how to populate it. Without guidance, an AI agent might leave the placeholder as-is or use inconsistent heuristics.Consider adding an instruction in the execution steps, for example after line 64 or in the inline fallback rules (around line 72):
- Populate `metadata.author` by inferring from `git config user.name` or prompting the user; never leave the placeholder or hardcode a value.This would align with the PR objectives and ensure consistent, correct author attribution in generated skills.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/assets/skills/skill-creator/SKILL.md` around lines 53 - 64, Update the SKILL.md frontmatter guidance to explicitly instruct how to populate metadata.author: in the execution steps (after the frontmatter example) or in the inline fallback rules, add a rule that metadata.author must be populated by inferring the author from git config user.name or by prompting the user for their GitHub username, and that the generator must never leave the placeholder or hardcode a value; reference the frontmatter example (the name/description/license/metadata block) and the metadata.author field when adding this instruction.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@internal/assets/skills/skill-creator/SKILL.md`:
- Around line 53-64: Update the SKILL.md frontmatter guidance to explicitly
instruct how to populate metadata.author: in the execution steps (after the
frontmatter example) or in the inline fallback rules, add a rule that
metadata.author must be populated by inferring the author from git config
user.name or by prompting the user for their GitHub username, and that the
generator must never leave the placeholder or hardcode a value; reference the
frontmatter example (the name/description/license/metadata block) and the
metadata.author field when adding this instruction.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1fe79a7f-9e47-428e-bec3-383d65cfd9d2
⛔ Files ignored due to path filters (4)
testdata/golden/skills-claude-skill-creator.goldenis excluded by!testdata/**testdata/golden/skills-kiro-skill-creator.goldenis excluded by!testdata/**testdata/golden/skills-opencode-skill-creator.goldenis excluded by!testdata/**testdata/golden/skills-windsurf-skill-creator.goldenis excluded by!testdata/**
📒 Files selected for processing (1)
internal/assets/skills/skill-creator/SKILL.md
c23d382
into
Gentleman-Programming:main
🔗 Linked Issue
Closes #98
🏷️ PR Type
type:bug— Bug fix (non-breaking change that fixes an issue)📝 Summary
The
skill-creatorSKILL.md template and the Frontmatter Fields documentation table both hardcodedmetadata.author: gentleman-programming. As a result, every skill generated by the AI through this skill inherited the wrong author. The reporter mentioned 17 skills mis-attributed before noticing.Following your approval comment (use a placeholder or read from
git config user.name):author: gentleman-programming→author: "{your-github-username}"git config user.nameor ask the user — never hardcode🏛️ Architectural decision (pinged you in the issue)
The issue lists 3 locations. This PR touches 2 (template + docs table) and intentionally keeps the skill-creator's own frontmatter (line ~8) as
author: gentleman-programming, because the skill-creator IS your official skill — changing it to a placeholder would be false. The bug is that GENERATED skills inherit the wrong author, not the upstream skill itself.Asked you in the issue comment to confirm this reading. Happy to extend to the 3rd location if you prefer.
📂 Changes
internal/assets/skills/skill-creator/SKILL.mdtestdata/golden/skills-claude-skill-creator.goldentestdata/golden/skills-opencode-skill-creator.goldentestdata/golden/skills-windsurf-skill-creator.goldentestdata/golden/skills-kiro-skill-creator.goldenTotal: 5 files, +10/-10 lines.
🧪 Test Plan
Unit Tests (ran locally)
go test ./internal/components/ -run TestGoldenSkillsTestGoldenSkills_Claude— PASSTestGoldenSkills_OpenCode— PASSTestGoldenSkills_Windsurf— PASSTestGoldenSkills_Kiro— PASSgo vet ./...clean on touched packagesE2E Tests (Docker required)
Pre-existing Windows unit test failures (NOT introduced by this PR):
TestSkillPathForAgent(path separator),TestGoldenEngram_Antigravity(snapshot drift on main), and severalTestInjectOpenCode*tests requiringbun add unique-names-generatorin test temp dirs. Verified these fail identically on a cleanorigin/maincheckout.✅ Contributor Checklist
status:approved)Co-Authored-Bytrailers⏳ Pending maintainer actions
type:buglabel to this PR (contributor cannot self-apply; CI validation blocks merge until then)Summary by CodeRabbit