Skip to content

feat: add spark skill and SKILL.md validation CI#6

Open
glebedel wants to merge 2 commits intomainfrom
feat/add-spark-skill
Open

feat: add spark skill and SKILL.md validation CI#6
glebedel wants to merge 2 commits intomainfrom
feat/add-spark-skill

Conversation

@glebedel
Copy link
Copy Markdown
Contributor

@glebedel glebedel commented Mar 15, 2026

Summary

  • Adds skills/spark/SKILL.md — detects PR/project context, proposes the single highest-leverage non-obvious addition, then offers to build it
  • Adds .github/scripts/validate_skills.py — validates all SKILL.md files have required YAML frontmatter (name + description)
  • Splits the existing CI job into two: validate-manifest (existing) + validate-skills (new)
  • Fixes pre-existing $schema key in marketplace.json that was causing the manifest validator to fail

Installing after merge

/plugin marketplace add stackonehq/agent-plugins-marketplace
/plugin install stackone@stackone-marketplace

Then invoke with /spark or "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 pass
  • npx @anthropic-ai/claude-code plugin validate . — manifest passes
  • CI runs both jobs on this PR

🤖 Generated with Claude Code


Summary by cubic

Add the spark skill to propose and build the single highest-impact addition for a PR/branch or project. Add CI to validate SKILL.md, split validation into separate jobs, fix manifest validation, and address review feedback to improve default branch detection and validator reliability.

  • New Features

    • Add skills/spark/SKILL.md to detect PR/project context and propose one non-obvious, high-value change, then offer to implement it.
    • Add .github/scripts/validate_skills.py and a validate-skills job to enforce name and description in each SKILL.md; split CI from the manifest check.
  • Bug Fixes

    • Remove $schema from .claude-plugin/marketplace.json to pass @anthropic-ai/claude-code manifest validation.
    • Spark: detect the actual default branch via origin/HEAD instead of hard-coding main.
    • Validator: resolve the skills/ path from the repo root, not the current working directory.

Written for commit 218c8ae. Summary will update on new commits.

- 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>
Copilot AI review requested due to automatic review settings March 15, 2026 12:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md skill that detects PR/project context and proposes impactful additions
  • New .github/scripts/validate_skills.py CI script to validate SKILL.md frontmatter (requires name + description)
  • Split CI workflow into validate-manifest and validate-skills jobs; removed invalid $schema key from marketplace.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.

Comment on lines +1 to +9
---
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"
---
Comment on lines +3 to +4
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
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Mar 15, 2026

Choose a reason for hiding this comment

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

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>
Suggested change
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}
Fix with Cubic

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.

2 participants