Skip to content

[v2 of 169] feat: issue-169 (rescue from deleted branch)#187

Merged
Delqhi merged 1 commit into
mainfrom
feat/issue-169-v2
Jun 16, 2026
Merged

[v2 of 169] feat: issue-169 (rescue from deleted branch)#187
Delqhi merged 1 commit into
mainfrom
feat/issue-169-v2

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Replaces the deleted PR for issue-169. The v1 branch (feat/issue-169) was deleted by a cleanup pass; this v2 carries the same content.

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sin-code Ready Ready Preview, Comment, Open in v0 Jun 16, 2026 3:00pm

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)
📊 Download SARIF (for Code Scanning)

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Medium findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)

Run ID: 27626957440 · Commit: ${github.sha}

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

Add a first-party registry + marker-fenced installer that drops the
34 bundled Skills into one of 8 supported agent families
(Claude Code / Codex / Gemini / opencode / Cursor / Windsurf /
Cline / GitHub Copilot) from a single command:

  sin-code skill install <name> --agent <target>
  sin-code skill install <name> --agent all
  sin-code skill uninstall <name> --agent <target>
  sin-code skill list [--installed] [--agent <target>] [--json]

The new package internal/skilldist exposes Target / Targets and three
Format writers:

  FormatDir    — copy the Skill tree (Claude Code / opencode / Gemini)
  FormatRule   — single .md / .mdc rule file with marker fence
                 (Codex / Cursor / Windsurf / Cline)
  FormatMarker — one fenced block per Skill in a shared agent
                 instructions file (Copilot)

The marker fence is rg-friendly ASCII, with strict-mode-tolerant pads:

  <!-- SIN-CODE-SKILL-START: <skill> -->
  … rendered body …
  <!-- SIN-CODE-SKILL-END:   <skill> -->

Re-running the install replaces the block in place via
ParseMarkers-driven reconstruction, so a re-run never duplicates
content. The legacy sin-code skill install / status grammar is
preserved verbatim when --agent is not set; the new surfaces are
additive.

Tests:
- Race-safe unit suite in internal/skilldist covering registry
  integrity, ParseMarkers round-trip on every edge case
  (CRLF, half-opened fence, distinct skills, multi-block
  preservation), Format-aware Install / Uninstall round trips,
  and atomicWrite atomicity on parent-mkdir failure.
@Delqhi
Delqhi force-pushed the feat/issue-169-v2 branch from 8746448 to c749917 Compare June 16, 2026 15:00
@Delqhi
Delqhi merged commit db45ce8 into main Jun 16, 2026
9 of 10 checks passed
@Delqhi
Delqhi deleted the feat/issue-169-v2 branch June 16, 2026 15:01
if err != nil {
return err
}
if err := os.MkdirAll(filepath.Dir(resolved), 0o755); err != nil {
// re-install because the same SKILL.md's identity (path + content) is
// idempotent.
func writeSkillDir(srcRoot, resolved, skill string) error {
if err := os.MkdirAll(resolved, 0o755); err != nil {
return fmt.Errorf("skilldist: mkdir %q: %w", resolved, err)
}
src := filepath.Join(srcRoot, skill, "SKILL.md")
in, err := os.ReadFile(src)
if err != nil {
return fmt.Errorf("skilldist: read %q: %w", src, err)
}
if err := os.WriteFile(filepath.Join(resolved, "SKILL.md"), in, 0o644); err != nil {
if err != nil {
return fmt.Errorf("skilldist: read %q: %w", src, err)
}
if err := os.WriteFile(filepath.Join(resolved, "SKILL.md"), in, 0o644); err != nil {
}
return st.IsDir(), nil
case FormatRule, FormatMarker:
data, err := os.ReadFile(resolved)
Comment thread cmd/sin-code/skill_cmd.go
// even though skillsmith would happily read from fs.FS.
func extractSkillFromFS(src fs.FS, dstRoot, skill string) error {
out := filepath.Join(dstRoot, skill)
if err := os.MkdirAll(out, 0o755); err != nil {
Comment thread cmd/sin-code/skill_cmd.go
if err != nil {
return fmt.Errorf("extractSkillFromFS(%q): read SKILL.md: %w", skill, err)
}
if err := os.WriteFile(filepath.Join(out, "SKILL.md"), skillMD, 0o644); err != nil {
Comment thread cmd/sin-code/skill_cmd.go
return err
}
subDir := filepath.Join(out, sub)
if err := os.MkdirAll(subDir, 0o755); err != nil {
Comment thread cmd/sin-code/skill_cmd.go
if err := os.MkdirAll(subDir, 0o755); err != nil {
return err
}
if err := os.WriteFile(filepath.Join(subDir, e.Name()), data, 0o644); err != nil {
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