Skip to content

fix: make each skill self-contained for npx skills and gh skill - #4

Merged
EastSun5566 merged 9 commits into
mainfrom
fix/self-contained-skills
Nov 27, 2026
Merged

EastSun5566 merged 9 commits into
mainfrom
fix/self-contained-skills

Conversation

@EastSun5566

Copy link
Copy Markdown
Contributor

npx skills add and gh skill install copy only the skill directory, so the ../../shared/... links and scripts broke after install. For example, push-to-hackmd could not find safe-sync.sh.

Following the approach in anthropics/skills, each skill now carries its own copy of the shared files:

  • shared/ stays the single source. The old shared/README.md contract moves to shared/references/contract.md, so its links also work from inside a skill.
  • scripts/sync-shared.sh copies the files into each skill's scripts/ and references/. --check fails if a copy differs from shared/, and the new Check shared files workflow runs it.
  • The three SKILL.md files now use skill-relative paths, such as scripts/safe-sync.sh. visualize-hmd also had the outdated HACKMD_API_TOKEN variable, which is fixed here.

Checked: no broken relative links inside a single installed skill. After npx skills add <this branch> --skill push-to-hackmd, scripts/resolve-note.sh runs from the installed copy.

Stacked on #3.

🤖 Generated with Claude Code

EastSun5566 and others added 8 commits November 27, 2026 22:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Reject links that are not notes, non-hackmd.io hosts, and bad input instead of returning a fake id; resolve short ids and /s/ URLs through the CLI
- Resolve permalinks to the internal id before updates
- Mention team-folders create for team destinations
- Truncate the conflict diff correctly in safe-sync.sh
- Replace HACKMD_API_TOKEN in the visualize-hmd README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Sync the hardened resolve-note.sh and safe-sync.sh into each skill
- Reject unknown arguments in sync-shared.sh
- Point safe-sync.sh at references/contract.md
- Name related skills instead of linking outside the skill directory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Skip the token question when hackmd-cli whoami succeeds
- Read the new note id with .[0].id and avoid duplicate creates
- Verify permissions and folder placement with api call GetNote/GetTeamNote
- Treat visualize-hmd as optional and drop the missing hackmd-cli.mdc reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EastSun5566
EastSun5566 deleted the branch fix/cli-first-push-to-hackmd November 27, 2026 14:36
@EastSun5566 EastSun5566 reopened this Nov 27, 2026
@EastSun5566
EastSun5566 changed the base branch from fix/cli-first-push-to-hackmd to main November 27, 2026 14:36
…ills

# Conflicts:
#	push-to-hackmd/SKILL.md
#	shared/README.md
@EastSun5566
EastSun5566 merged commit 8c315eb into main Nov 27, 2026
1 check passed
@EastSun5566
EastSun5566 deleted the fix/self-contained-skills branch November 27, 2026 14:37
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.

1 participant