feat: add spark skill and SKILL.md validation CI#6
Conversation
- Add skills/spark/SKILL.md — finds the single highest-leverage addition to any PR/branch or project and offers to implement it - Add .github/scripts/validate_skills.py — validates all SKILL.md files have required YAML frontmatter fields (name, description) - Split validate.yml into two jobs: validate-manifest + validate-skills - Fix pre-existing $schema key in marketplace.json that was failing validation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a new "spark" skill that analyzes the current PR/project context to propose the single highest-leverage addition, along with a CI validation script for SKILL.md frontmatter and a fix for a $schema key in marketplace.json that was breaking manifest validation.
Changes:
- New
skills/spark/SKILL.mdskill that detects PR/project context and proposes impactful additions - New
.github/scripts/validate_skills.pyCI script to validate SKILL.md frontmatter (requiresname+description) - Split CI workflow into
validate-manifestandvalidate-skillsjobs; removed invalid$schemakey frommarketplace.json
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
skills/spark/SKILL.md |
New skill: context-aware ideation and implementation workflow |
.github/scripts/validate_skills.py |
New validation script checking SKILL.md frontmatter for required fields |
.github/workflows/validate.yml |
Split into two jobs; added validate-skills job |
.claude-plugin/marketplace.json |
Removed $schema key that was failing manifest validation |
README.md |
Updated skill count to 7 and added spark to the skills table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
| name: spark | ||
| description: This skill should be used when the user invokes "/spark" or asks "what's the best thing you could add to this PR/project?", "what single feature would make this better?", "what's the most impactful next move?", or "what would you add to this branch/codebase?". Generates the single smartest, most innovative and high-value addition to the current PR/branch or project, then offers to implement it. | ||
| invoke: spark | ||
| license: MIT | ||
| metadata: | ||
| author: stackone | ||
| version: "1.0" | ||
| --- |
| description: This skill should be used when the user invokes "/spark" or asks "what's the best thing you could add to this PR/project?", "what single feature would make this better?", "what's the most impactful next move?", or "what would you add to this branch/codebase?". Generates the single smartest, most innovative and high-value addition to the current PR/branch or project, then offers to implement it. | ||
| invoke: spark |
There was a problem hiding this comment.
2 issues found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/spark/SKILL.md">
<violation number="1" location="skills/spark/SKILL.md:32">
P2: Determine the repository's actual default branch instead of hard-coding `main`; otherwise PR-mode context can be wrong or empty in many repos.</violation>
</file>
<file name=".github/scripts/validate_skills.py">
<violation number="1" location=".github/scripts/validate_skills.py:34">
P1: Resolve `skills/` relative to the repository instead of the current working directory; otherwise this validator can pass without checking any files.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- spark: detect actual default branch via origin/HEAD instead of hard-coding main - validate_skills.py: resolve skills/ relative to repo root, not cwd Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/spark/SKILL.md">
<violation number="1" location="skills/spark/SKILL.md:32">
P1: The fallback to `main` is ineffective here because the pipeline still succeeds when `origin/HEAD` is missing, leaving `BASE` empty and breaking the diff/log range.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| Gather PR context: | ||
| ```bash | ||
| BASE=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main) |
There was a problem hiding this comment.
P1: The fallback to main is ineffective here because the pipeline still succeeds when origin/HEAD is missing, leaving BASE empty and breaking the diff/log range.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/spark/SKILL.md, line 32:
<comment>The fallback to `main` is ineffective here because the pipeline still succeeds when `origin/HEAD` is missing, leaving `BASE` empty and breaking the diff/log range.</comment>
<file context>
@@ -29,9 +29,10 @@ Triggers when: on a non-default branch (`main`/`master`/`develop`/`trunk`) OR wh
-git diff main...HEAD --stat # What files changed?
-git diff main...HEAD # Full diff (skim for intent)
-git log main...HEAD --oneline # Commits in this branch
+BASE=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main)
+git diff $BASE...HEAD --stat # What files changed?
+git diff $BASE...HEAD # Full diff (skim for intent)
</file context>
| BASE=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main) | |
| BASE=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||') | |
| BASE=${BASE:-main} |
Summary
skills/spark/SKILL.md— detects PR/project context, proposes the single highest-leverage non-obvious addition, then offers to build it.github/scripts/validate_skills.py— validates allSKILL.mdfiles have required YAML frontmatter (name+description)validate-manifest(existing) +validate-skills(new)$schemakey inmarketplace.jsonthat was causing the manifest validator to failInstalling after merge
Then invoke with
/sparkor "what's the most impactful thing you could add to this PR?"Test plan
python3 .github/scripts/validate_skills.py— all 7 SKILL.md files passnpx @anthropic-ai/claude-code plugin validate .— manifest passes🤖 Generated with Claude Code
Summary by cubic
Add the
sparkskill to propose and build the single highest-impact addition for a PR/branch or project. Add CI to validateSKILL.md, split validation into separate jobs, fix manifest validation, and address review feedback to improve default branch detection and validator reliability.New Features
skills/spark/SKILL.mdto detect PR/project context and propose one non-obvious, high-value change, then offer to implement it..github/scripts/validate_skills.pyand avalidate-skillsjob to enforcenameanddescriptionin eachSKILL.md; split CI from the manifest check.Bug Fixes
$schemafrom.claude-plugin/marketplace.jsonto pass@anthropic-ai/claude-codemanifest validation.origin/HEADinstead of hard-codingmain.skills/path from the repo root, not the current working directory.Written for commit 218c8ae. Summary will update on new commits.