Skip to content

t2732: Add missing 'name' field to skill frontmatter#2733

Merged
alex-solovyev merged 2 commits intomainfrom
bugfix/t2732-skill-frontmatter
Mar 2, 2026
Merged

t2732: Add missing 'name' field to skill frontmatter#2733
alex-solovyev merged 2 commits intomainfrom
bugfix/t2732-skill-frontmatter

Conversation

@alex-solovyev
Copy link
Collaborator

@alex-solovyev alex-solovyev commented Mar 2, 2026

Summary

  • Added the required name field to YAML frontmatter in all 11 imported skill source files, fixing opencode startup errors when loading skills from ~/.config/opencode/skills/
  • Added a check_skill_frontmatter lint gate to linters-local.sh that validates all registered skills have a correct name field, preventing regression

Details

Skills deployed to ~/.config/opencode/skills/<name>/SKILL.md are symlinks to source .md files in the repo (via create_skill_symlinks() in setup-modules/plugins.sh). The opencode skill loader requires a name field in the YAML frontmatter matching the directory name. All 11 skills were missing this field.

Files fixed

Skill name Source file
remotion .agents/tools/video/remotion.md
video-prompt-design .agents/tools/video/video-prompt-design.md
caldav-calendar .agents/tools/productivity/caldav-calendar-skill.md
cloudron-server-ops .agents/tools/deployment/cloudron-server-ops-skill.md
cloudron-app-publishing .agents/tools/deployment/cloudron-app-publishing-skill.md
cloudflare-platform .agents/services/hosting/cloudflare-platform.md
proxmox-full .agents/services/hosting/proxmox-full-skill.md
cloudron-app-packaging .agents/tools/deployment/cloudron-app-packaging-skill.md
heygen .agents/tools/video/heygen-skill.md
animejs .agents/tools/animation/animejs.md
seo-audit .agents/seo/seo-audit-skill.md

Regression prevention

Added check_skill_frontmatter to linters-local.sh (gated as skill-frontmatter). It reads skill-sources.json, extracts the name field from each skill's frontmatter, and validates it matches the registered name. Runs as part of the standard lint suite.

Closes #2732

Summary by CodeRabbit

  • Chores
    • Added a frontmatter validation check to enforce consistent skill metadata.
    • Standardized and added metadata (name, description, mode, imported_from, tools) to multiple skill and tool documents to improve organization and discoverability.

All 11 imported skills registered in skill-sources.json were missing the
required 'name' field in their YAML frontmatter, causing opencode to error
on startup when loading skills from ~/.config/opencode/skills/.

Added name: <directory-name> to each skill source file:
- remotion, video-prompt-design, caldav-calendar, cloudron-server-ops,
  cloudron-app-publishing, cloudflare-platform, proxmox-full,
  cloudron-app-packaging, heygen, animejs, seo-audit

Also added a skill-frontmatter lint check to linters-local.sh that
validates all registered skills have a 'name' field matching their
skill-sources.json entry, preventing regression.

Closes #2732
@github-actions github-actions bot added the enhancement Auto-created from TODO.md tag label Mar 2, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses critical startup errors in opencode by ensuring that all imported skill files contain a mandatory 'name' field in their YAML frontmatter. This change not only fixes existing issues but also introduces a robust linting mechanism to prevent similar problems from recurring, thereby improving the stability and maintainability of the skill loading process.

Highlights

  • Skill Frontmatter Fix: The required 'name' field was added to the YAML frontmatter of 11 imported skill source files, resolving opencode startup errors related to skill loading.
  • Regression Prevention: A new 'check_skill_frontmatter' lint gate was introduced to 'linters-local.sh' to validate that all registered skills have a correct 'name' field, preventing future regressions.
Changelog
  • .agents/scripts/linters-local.sh
    • Added a new shell function check_skill_frontmatter to validate the 'name' field in skill YAML frontmatter against skill-sources.json.
    • Integrated the check_skill_frontmatter function into the main linting process, making it an optional gate.
    • Updated the script's introductory comments to reflect the addition of skill frontmatter validation.
  • .agents/seo/seo-audit-skill.md
    • Added the name: seo-audit field to the YAML frontmatter.
  • .agents/services/hosting/cloudflare-platform.md
    • Added the name: cloudflare-platform field to the YAML frontmatter.
  • .agents/services/hosting/proxmox-full-skill.md
    • Added the name: proxmox-full field to the YAML frontmatter.
  • .agents/tools/animation/animejs.md
    • Added the name: animejs field to the YAML frontmatter.
  • .agents/tools/deployment/cloudron-app-packaging-skill.md
    • Added the name: cloudron-app-packaging field to the YAML frontmatter.
  • .agents/tools/deployment/cloudron-app-publishing-skill.md
    • Added the name: cloudron-app-publishing field to the YAML frontmatter.
  • .agents/tools/deployment/cloudron-server-ops-skill.md
    • Added the name: cloudron-server-ops field to the YAML frontmatter.
  • .agents/tools/productivity/caldav-calendar-skill.md
    • Added the name: caldav-calendar field to the YAML frontmatter.
  • .agents/tools/video/heygen-skill.md
    • Added the name: heygen field to the YAML frontmatter.
  • .agents/tools/video/remotion.md
    • Added the name: remotion field to the YAML frontmatter.
  • .agents/tools/video/video-prompt-design.md
    • Added the name: video-prompt-design field to the YAML frontmatter.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d4d7f6 and aadc945.

📒 Files selected for processing (1)
  • .agents/scripts/linters-local.sh

Walkthrough

Adds a shell-based skill frontmatter validator and updates 11 skill markdown files to include name in their YAML frontmatter; validator is gated into the local linters script. The script insertion is duplicated in the diff (function and gate invocation appear twice).

Changes

Cohort / File(s) Summary
Linter script
.agents/scripts/linters-local.sh
Adds check_skill_frontmatter and integrates it as a skill-frontmatter gate into the main linter flow. Note: the function and its gate invocation are duplicated in the patch and should be de-duplicated.
Skill metadata (frontmatter additions)
.agents/seo/seo-audit-skill.md, .agents/services/hosting/cloudflare-platform.md, .agents/services/hosting/proxmox-full-skill.md, .agents/tools/animation/animejs.md, .agents/tools/deployment/cloudron-app-packaging-skill.md, .agents/tools/deployment/cloudron-app-publishing-skill.md, .agents/tools/deployment/cloudron-server-ops-skill.md, .agents/tools/productivity/caldav-calendar-skill.md, .agents/tools/video/heygen-skill.md, .agents/tools/video/remotion.md, .agents/tools/video/video-prompt-design.md
Adds name (and other metadata fields in some files) to each SKILL.md frontmatter so the declared name matches the skill directory names.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer / CI
    participant Linter as linters-local.sh
    participant Registry as skill-sources.json
    participant FS as Skill SKILL.md files
    Dev->>Linter: run linter (skill-frontmatter gate)
    Linter->>Registry: read .skills list (jq)
    Registry-->>Linter: list of skill entries
    loop for each skill
        Linter->>FS: load skill's SKILL.md frontmatter
        FS-->>Linter: frontmatter YAML (name)
        Linter->>Linter: compare registered name vs frontmatter name
        alt mismatch or missing
            Linter->>Dev: print error (missing file/name or mismatch)
        else match
            Linter->>Dev: print success for skill
        end
    end
    Linter->>Dev: exit non-zero if any errors
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

documentation

Poem

A linter wakes to check each name,
SKILL.md and registry play the game,
Duplicate lines beg to be pruned,
Frontmatter fixed — no more misnamed tunes! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The diff shows duplication of check_skill_frontmatter function and gate invocation in linters-local.sh, indicating the same validation code appears twice unintentionally. Review and remove the duplicated check_skill_frontmatter function and gate invocation in linters-local.sh to maintain clean script architecture and prevent redundant validation execution.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding missing 'name' field to skill frontmatter across 11 skill files.
Linked Issues check ✅ Passed The PR fulfills all requirements from #2732: adds 'name' field to all 11 affected skill files, implements frontmatter validation gate in linters-local.sh, and prevents future regressions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/t2732-skill-frontmatter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 111 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Mar 2 22:06:54 UTC 2026: Code review monitoring started
Mon Mar 2 22:06:55 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 111

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 111
  • VULNERABILITIES: 0

Generated on: Mon Mar 2 22:06:57 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/scripts/linters-local.sh:
- Around line 647-652: The current assignment to skill_count using
"skill_count=$(jq '.skills | length' "$skill_sources" 2>/dev/null || echo "0")"
masks jq parse errors; change it to run jq without the "|| echo '0'", capture
jq's exit status, and on failure print an error referencing "$skill_sources" and
exit/return non-zero so the script fails fast; update the same pattern at the
other occurrence (the second jq call around skill validation) and ensure the
downstream if [[ "$skill_count" -eq 0 ]] branch still works when jq succeeded.
- Around line 666-674: The fm_name extraction should only search the initial
frontmatter block and strip inline YAML comments: change the awk script used for
fm_name (reading "$local_path") to first detect an opening frontmatter only at
the file start (e.g., begin scanning only after the first /^---$/ and stop after
the next /^---$/ so you don't toggle on every ---), then when matching /^name:/
remove the key prefix, strip any inline comment portion (e.g., sub(/#.*/, "") or
similar) and then strip surrounding quotes (the existing gsub for quotes can
remain), print the cleaned value and exit to avoid reading from the document
body.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56ef325 and 9d4d7f6.

📒 Files selected for processing (12)
  • .agents/scripts/linters-local.sh
  • .agents/seo/seo-audit-skill.md
  • .agents/services/hosting/cloudflare-platform.md
  • .agents/services/hosting/proxmox-full-skill.md
  • .agents/tools/animation/animejs.md
  • .agents/tools/deployment/cloudron-app-packaging-skill.md
  • .agents/tools/deployment/cloudron-app-publishing-skill.md
  • .agents/tools/deployment/cloudron-server-ops-skill.md
  • .agents/tools/productivity/caldav-calendar-skill.md
  • .agents/tools/video/heygen-skill.md
  • .agents/tools/video/remotion.md
  • .agents/tools/video/video-prompt-design.md

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes missing name fields in skill frontmatter, which caused startup errors, by updating 11 skill files and introducing a new linter check in linters-local.sh to prevent future regressions. However, the new check_skill_frontmatter lint gate in .agents/scripts/linters-local.sh introduces a potential command injection vulnerability, as file paths are passed directly to awk without proper sanitization, which could lead to arbitrary code execution. I've also provided suggestions to improve the robustness of the linter script's jq commands to avoid suppressing errors, which will help in debugging malformed JSON configuration files.

Comment on lines +666 to +674
fm_name=$(awk '
/^---$/ { in_fm = !in_fm; next }
in_fm && /^name:/ {
sub(/^name: */, "")
gsub(/^["'"'"']|["'"'"']$/, "")
print
exit
}
' "$local_path")

Choose a reason for hiding this comment

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

security-high high

The check_skill_frontmatter function reads file paths from skill-sources.json and passes them directly to awk. If a file path starts with a hyphen (e.g., -f/path/to/script), awk will interpret it as an option. An attacker can exploit this to execute arbitrary awk code, which can in turn execute shell commands via the system() function. This is particularly dangerous in CI/CD environments where the linter might be run on untrusted PR content.

Suggested change
fm_name=$(awk '
/^---$/ { in_fm = !in_fm; next }
in_fm && /^name:/ {
sub(/^name: */, "")
gsub(/^["'"'"']|["'"'"']$/, "")
print
exit
}
' "$local_path")
fm_name=$(awk '
/^---$/ { in_fm = !in_fm; next }
in_fm && /^name:/ {
sub(/^name: */, "")
gsub(/^[\"'"'"']|[\"'"'"']$/, "")
print
exit
}
' -- "$local_path")

fi

local skill_count
skill_count=$(jq '.skills | length' "$skill_sources" 2>/dev/null || echo "0")

Choose a reason for hiding this comment

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

medium

Suppressing stderr with 2>/dev/null can hide important syntax errors if skill-sources.json is malformed. You can make the jq query more robust by using the alternative operator // to provide a default empty array if .skills is null or doesn't exist. This avoids the error that || echo "0" is intended to catch, and allows you to remove the error suppression so that actual file format errors are visible.

This aligns with the project's general rule to avoid blanket error suppression.

Suggested change
skill_count=$(jq '.skills | length' "$skill_sources" 2>/dev/null || echo "0")
skill_count=$(jq '(.skills // []) | length' "$skill_sources")
References
  1. Avoid using '2>/dev/null' for blanket suppression of command errors in shell scripts to ensure that authentication, syntax, or system issues remain visible for debugging.

fi

((checked++)) || true
done < <(jq -r '.skills[] | "\(.name)|\(.local_path)"' "$skill_sources" 2>/dev/null)

Choose a reason for hiding this comment

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

medium

Similar to the count check, suppressing stderr here with 2>/dev/null can hide JSON syntax errors. By using (.skills // [])[], the query will gracefully handle cases where skills is missing or null by iterating over an empty array, producing no output. This makes the error suppression unnecessary and ensures that developers are alerted to malformed JSON files.

This follows the project's general rule to avoid unnecessary error suppression.

Suggested change
done < <(jq -r '.skills[] | "\(.name)|\(.local_path)"' "$skill_sources" 2>/dev/null)
done < <(jq -r '(.skills // [])[] | "\(.name)|\(.local_path)"' "$skill_sources")
References
  1. Avoid using '2>/dev/null' for blanket suppression of command errors in shell scripts to ensure that authentication, syntax, or system issues remain visible for debugging.

@alex-solovyev
Copy link
Collaborator Author

Pulse dispatched a worker to address the CodeRabbit CHANGES_REQUESTED items: (1) fix jq error masking in skill_count assignment (remove '|| echo 0' fallback), (2) fix awk frontmatter extraction to only scan the initial --- block and strip inline YAML comments. Worker PID 2953496.

- Fail fast on jq parse errors instead of masking with || echo 0
- Restrict awk name extraction to initial frontmatter block only
- Strip inline YAML comments from frontmatter name values
- Pre-validate skill entries before loop iteration

Closes #2732
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 111 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Mar 2 22:40:18 UTC 2026: Code review monitoring started
Mon Mar 2 22:40:18 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 111

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 111
  • VULNERABILITIES: 0

Generated on: Mon Mar 2 22:40:21 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@alex-solovyev alex-solovyev merged commit 093516f into main Mar 2, 2026
18 checks passed
@github-actions github-actions bot mentioned this pull request Mar 2, 2026
@marcusquinn marcusquinn deleted the bugfix/t2732-skill-frontmatter branch March 3, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors on some skills

1 participant