Skip to content

Improve repo structure, CI pipeline, and contributor experience#5

Merged
JoshDFN merged 5 commits intomainfrom
marc0olo/improve-repo-structure-and-ci
Feb 26, 2026
Merged

Improve repo structure, CI pipeline, and contributor experience#5
JoshDFN merged 5 commits intomainfrom
marc0olo/improve-repo-structure-and-ci

Conversation

@marc0olo
Copy link
Member

@marc0olo marc0olo commented Feb 26, 2026

Summary

  • Shared parser module — Extract duplicated frontmatter parsing across 5 generation scripts into scripts/lib/parse-skill.js (single source of truth)
  • Structural validation — Add scripts/validate-skills.js checking frontmatter fields, required sections, dependency graph integrity, circular dependency detection, and code block annotations. Runs in CI and locally via npm run validate
  • CI pipeline hardened — Split into three workflows: _checks.yml (reusable validation, freshness, version bump checks), ci.yml (PR-only, shows as "PR / checks / validate"), and deploy.yml (push-to-main only, builds and deploys to GitHub Pages). Deploy permissions (pages: write, id-token: write) scoped exclusively to the deploy job
  • Frontmatter improvements — Add requires and tags fields to all 12 skills; remove redundant > version: body lines (frontmatter as single source of truth); patch-bump all skill versions
  • Auto-generated ai-plugin.json — Now produced dynamically alongside agent.json with accurate skill count and list
  • Deterministic sitemap — Moved from committed public/ to build-time dist/ generation using git commit dates (no more new Date() drift)
  • Contributor docs aligned — CONTRIBUTING.md adds Setup section, generate step, and versioning rules. New .claude/CLAUDE.md for AI agent contributors
  • Schema and templateskills/skill.schema.json and skills/_template/SKILL.md.template for consistent new skill creation
  • README updated — Programmatic Access section, accurate tool usage instructions, restored planned REST API section

Consolidate duplicated parsing logic into a shared module, add structural
validation, harden the CI pipeline for PRs, and align all documentation
with actual tooling behavior.

- Extract shared parser into scripts/lib/parse-skill.js (eliminates 5x duplication)
- Add scripts/validate-skills.js for frontmatter, sections, deps, and cycle detection
- Add skills/skill.schema.json and skills/_template/SKILL.md.template
- Add .claude/CLAUDE.md with contributor instructions
- Add PR validation and version bump enforcement to CI pipeline
- Auto-generate ai-plugin.json alongside agent.json
- Move sitemap.xml to build-time dist/ generation (deterministic git dates)
- Add requires and tags fields to all 12 skill frontmatter blocks
- Remove redundant > version: body lines (frontmatter as single source of truth)
- Add Setup section and generate step to CONTRIBUTING.md
- Update README with Programmatic Access section and accurate usage instructions
Move pages:write and id-token:write from workflow-level to the deploy
job only so PR runs cannot trigger deployments. Patch-bump all 12 skill
versions to satisfy the new CI version-check gate.
- _checks.yml: reusable workflow with validation, freshness, and version bump checks
- ci.yml: PR-only trigger, calls _checks.yml (shows as "PR / checks / validate")
- deploy.yml: push-to-main only, calls _checks.yml then builds and deploys
@marc0olo
Copy link
Member Author

Follow-up: Reconsider ## Prerequisites section vs requires frontmatter field

There's overlap between the requires frontmatter field (machine-parseable) and the ## Prerequisites markdown section (human-readable). Both list tool/package dependencies, creating a drift risk where contributors update one but forget the other.

Since skills are primarily consumed by agents (who parse frontmatter), we should consider:

  • Dropping ## Prerequisites as a required section
  • Making requires the single source of truth for dependencies
  • Optionally enriching requires to capture install hints (e.g. icp-cli >= 0.1.0 + how to install)

This would require updating the template, validator (REQUIRED_SECTIONS), CLAUDE.md, and all 12 existing skills — better suited for a dedicated PR.

Would love to hear thoughts from anyone who has opinions on this. Please comment if you have ideas on how the requires field should evolve or whether ## Prerequisites still adds enough value to keep.

marc0olo and others added 2 commits February 26, 2026 13:23
Merge upstream changes (ic-cdk 0.19 migration, audit fixes). Resolve
conflicts by keeping frontmatter as source of truth (no body version
lines) and updating requires fields to ic-cdk >= 0.19. Regenerate
llms-full.txt. Remove sitemap.xml (moved to build-time generation).
Update template, schema, README, and https-outcalls prerequisite
to reflect the current ic-cdk version.
Copy link
Collaborator

@JoshDFN JoshDFN left a comment

Choose a reason for hiding this comment

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

Looks good — pushed a fix commit bumping ic-cdk references from 0.18 to 0.19 in the template, schema, README, and https-outcalls.

Copy link
Collaborator

@JoshDFN JoshDFN left a comment

Choose a reason for hiding this comment

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

Looks good — pushed a fix commit bumping ic-cdk references from 0.18 to 0.19 in the template, schema, README, and https-outcalls.

@JoshDFN JoshDFN merged commit ce7724e into main Feb 26, 2026
6 checks passed
@marc0olo marc0olo deleted the marc0olo/improve-repo-structure-and-ci branch February 27, 2026 14:45
marc0olo added a commit that referenced this pull request Mar 4, 2026
- Rename H1 to match skill name (Wallet Integration)
- Rename "Mistakes That Break Your Build" to "Pitfalls"
- Fix pitfall #5: clarify that requestPermissionsNotGranted() is a UX
  optimization, not a requirement (verified against library source)
- Make IcpWallet/IcrcWallet code blocks self-contained (add connect +
  accounts so agents get copy-paste correct code)
- Add error class imports to import map (RelyingPartyResponseError,
  RelyingPartyDisconnectedError)
- Remove "Build Your Project" section (generic TS commands)
- Replace "Verify It Works" with condensed "Expected Behavior" section
  focused on return types and behavioral facts not stated elsewhere
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.

3 participants