Skip to content

feat: improve skill scores for nitro#4116

Open
popey wants to merge 1 commit intonitrojs:mainfrom
popey:improve/skill-review-optimization
Open

feat: improve skill scores for nitro#4116
popey wants to merge 1 commit intonitrojs:mainfrom
popey:improve/skill-review-optimization

Conversation

@popey
Copy link

@popey popey commented Mar 16, 2026

Hullo 👋 @pi0

🔗 Linked issue

Fixes #4115 4115

I ran your skills through tessl skill review at work and found some targeted improvements.

score_card

Here's the full before/after in text form:

Skill Before After Change
nitro 43% 94% +51%
update-deps 0% 89% +89%

📚 Description

Changes made

nitro (skills/nitro/SKILL.md)

  • Expanded frontmatter description with specific capabilities (API routes, middleware, server plugins, scheduled tasks, WebSocket handlers) and deployment targets (Vercel, Cloudflare Workers, Deno, Bun)
  • Added explicit "Use when..." clause with natural trigger terms for better skill selection
  • Added quick-reference section with concrete, executable code examples (creating an API route, running dev server, building, deploying with presets)
  • Preserved the existing @docs/TOC.md reference and doc fallback URL

update-deps (.agents/skills/update-deps/SKILL.md)

  • Added YAML frontmatter with name and description fields (was missing entirely — caused 0% score due to validation failure)
  • Added "Use when..." clause covering common trigger scenarios (upgrading packages, outdated deps, version conflicts, dependency-update PRs)
  • Fixed inconsistent step numbering (was missing step 8, jumped from 7 to 9)
  • Added explicit CHECKPOINT validation gates between critical steps
  • Trimmed redundant introductory text

❓ Type of change

(I ticked "Documentation" because conceptually skills are docs, just not for you, but for agents. In case anyone is feeling picky) :D

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Want to self-improve your skills? Just point your agent (Claude Code, Codex, etc.) at this Tessl guide and ask it to optimize your skill. Ping me - @popey - if you hit any snags.

Hullo 👋 @pi0

I ran your skills through `tessl skill review` at work and found some targeted improvements. Here's the full before/after:

| Skill | Before | After | Change |
|-------|--------|-------|--------|
| nitro | 43% | 94% | +51% |
| update-deps | 0% | 89% | +89% |

<details>
<summary>Changes made</summary>

**nitro** (`skills/nitro/SKILL.md`)
- Expanded frontmatter description with specific capabilities (API routes, middleware, server plugins, scheduled tasks, WebSocket handlers) and deployment targets (Vercel, Cloudflare Workers, Deno, Bun)
- Added explicit "Use when..." clause with natural trigger terms for better skill selection
- Added quick-reference section with concrete, executable code examples (creating an API route, running dev server, building, deploying with presets)
- Preserved the existing `@docs/TOC.md` reference and doc fallback URL

**update-deps** (`.agents/skills/update-deps/SKILL.md`)
- Added YAML frontmatter with `name` and `description` fields (was missing entirely — caused 0% score due to validation failure)
- Added "Use when..." clause covering common trigger scenarios (upgrading packages, outdated deps, version conflicts, dependency-update PRs)
- Fixed inconsistent step numbering (was missing step 8, jumped from 7 to 9)
- Added explicit CHECKPOINT validation gates between critical steps
- Trimmed redundant introductory text

</details>

Honest disclosure — I work at @tesslio where we build tooling around skills like these. Not a pitch - just saw room for improvement and wanted to contribute.

Want to self-improve your skills? Just point your agent (Claude Code, Codex, etc.) at [this Tessl guide](https://docs.tessl.io/evaluate/optimize-a-skill-using-best-practices) and ask it to optimize your skill. Ping me - [@popey](https://github.com/popey) - if you hit any snags.

Thanks in advance 🙏
@popey popey requested a review from pi0 as a code owner March 16, 2026 08:21
@vercel
Copy link

vercel bot commented Mar 16, 2026

@popey is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

Two skill documentation files are enhanced with expanded content: update-deps/SKILL.md gains YAML-style front matter, structured step-by-step workflows with explicit commands, and detailed checkpoint guidance; nitro/SKILL.md is rewritten with enriched descriptions, quick reference sections, and practical code examples.

Changes

Cohort / File(s) Summary
Skill Documentation Updates
.agents/skills/update-deps/SKILL.md, skills/nitro/SKILL.md
Restructured and expanded skill documentation with improved front matter, detailed step-by-step processes, code examples, and enhanced guidance. Update-deps file introduces YAML front matter, numbered steps with explicit commands, checkpoint verification, and post-build workflows. Nitro file replaces brief description with multi-line content, adds Quick Reference with practical examples and Common Tasks sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: improve skill scores for nitro' follows conventional commits format with a descriptive prefix and message.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing specific improvements made to both SKILL.md files.
Linked Issues check ✅ Passed The changes fulfill all objectives from issue #4115: both skills received frontmatter improvements, capability/deployment clarifications, 'Use when...' clauses, and enhanced documentation.
Out of Scope Changes check ✅ Passed All changes are in-scope: two SKILL.md files were updated as specified in the linked issue to improve skill validation and usability.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

Copy link

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.agents/skills/update-deps/SKILL.md (2)

50-58: ⚠️ Potential issue | 🟡 Minor

Fix sed -i for cross-platform compatibility.

The sed -i command syntax differs between GNU sed (Linux) and BSD sed (macOS). On macOS, sed -i requires an empty string argument: sed -i '' .... This will cause the script to fail on macOS systems.

🔧 Proposed fix for portability
 # Revert nitro link references back to latest in all modified package.json files
 git diff --name-only | grep 'package.json$' | while read file; do
   if grep -q '"nitro": "link:' "$file" 2>/dev/null; then
-    sed -i 's/"nitro": "link:[^"]*"/"nitro": "latest"/g' "$file"
+    sed -i.bak 's/"nitro": "link:[^"]*"/"nitro": "latest"/g' "$file" && rm "${file}.bak"
     echo "Fixed: $file"
   fi
 done

This approach creates a .bak file and immediately removes it, which works identically on both GNU and BSD sed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/update-deps/SKILL.md around lines 50 - 58, The sed -i usage
in the SKILL.md script loop is not cross-platform; update the command used
inside the while loop (the sed invocation that replaces the "nitro" link) to use
a portable pattern that creates a backup and then removes it (e.g., use sed
-i.bak ... and then rm "$file.bak"), so macOS BSD sed and GNU sed both work;
adjust the block that checks grep -q '"nitro": "link:' "$file" and the sed
replacement invocation accordingly and ensure the script echoes "Fixed: $file"
only after successful replacement.

123-130: ⚠️ Potential issue | 🟡 Minor

Clarify contradictory guidance on typecheck errors.

Line 130 instructs to "Ignore errors, only report them in the end," which is contradictory and unclear. Should errors be fixed or just reported? This conflicts with the earlier instruction to "Fix issues manually" (line 128). Based on learnings, pnpm typecheck should be run after making changes, but the guidance on handling failures is ambiguous.

Consider clarifying the intent:

  • If typecheck errors should block the process: "Re-run pnpm typecheck and ensure all type errors are resolved."
  • If typecheck errors are informational: "Re-run pnpm typecheck to identify type issues. Document any unresolved errors in the summary."

Based on learnings: Run pnpm format and pnpm typecheck after making changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/update-deps/SKILL.md around lines 123 - 130, Update the "9.
Fix Remaining Issues" section to remove the contradiction between step 2 ("Fix
issues manually") and step 4 ("Ignore errors, only report them in the end") by
clarifying whether typecheck errors must be fixed or may be reported; edit steps
3–4 in the "9. Fix Remaining Issues" block to one clear policy: either replace
step 4 with "Re-run `pnpm typecheck` and ensure all type errors are resolved" if
type errors should block the process, or replace it with "Re-run `pnpm
typecheck` to identify type issues and document any unresolved errors in the
summary" if they are informational, and ensure the final sentence explicitly
instructs to run `pnpm format` and then `pnpm typecheck` after making changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/nitro/SKILL.md`:
- Around line 17-23: In the Common Tasks section replace the deprecated "npx
nitropack" invocations with the updated Nitro v3 CLI: change the snippet that
runs the dev server from "npx nitropack" to "npx nitro dev", change the build
command from "npx nitropack" to "npx nitro build", and change the Cloudflare
Pages build invocation from "npx nitropack build" to
"NITRO_PRESET=cloudflare-pages npx nitro build"; locate the three occurrences by
searching for the string "npx nitropack" in the Common Tasks section and update
them to match the Quick Reference examples.

---

Outside diff comments:
In @.agents/skills/update-deps/SKILL.md:
- Around line 50-58: The sed -i usage in the SKILL.md script loop is not
cross-platform; update the command used inside the while loop (the sed
invocation that replaces the "nitro" link) to use a portable pattern that
creates a backup and then removes it (e.g., use sed -i.bak ... and then rm
"$file.bak"), so macOS BSD sed and GNU sed both work; adjust the block that
checks grep -q '"nitro": "link:' "$file" and the sed replacement invocation
accordingly and ensure the script echoes "Fixed: $file" only after successful
replacement.
- Around line 123-130: Update the "9. Fix Remaining Issues" section to remove
the contradiction between step 2 ("Fix issues manually") and step 4 ("Ignore
errors, only report them in the end") by clarifying whether typecheck errors
must be fixed or may be reported; edit steps 3–4 in the "9. Fix Remaining
Issues" block to one clear policy: either replace step 4 with "Re-run `pnpm
typecheck` and ensure all type errors are resolved" if type errors should block
the process, or replace it with "Re-run `pnpm typecheck` to identify type issues
and document any unresolved errors in the summary" if they are informational,
and ensure the final sentence explicitly instructs to run `pnpm format` and then
`pnpm typecheck` after making changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80b988a5-5b3b-4110-9442-daed4127803a

📥 Commits

Reviewing files that changed from the base of the PR and between c31268c and b877ce1.

📒 Files selected for processing (2)
  • .agents/skills/update-deps/SKILL.md
  • skills/nitro/SKILL.md

Comment on lines +17 to +23
```bash
# Browse docs by topic
npx nitro docs --page /docs/routing

# Full docs index
npx nitro docs
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check which Nitro CLI commands are documented and valid

# Search for CLI command references in the repository
echo "=== Searching for nitro CLI command patterns ==="
rg -n "npx nitro(?:pack)?\b" --type md -C2

echo -e "\n=== Checking package.json for bin entries ==="
fd -e json "^package\.json$" --exec jq -r 'select(.bin != null) | "File: \(.name // "unknown")\nBin entries: \(.bin)"' 2>/dev/null

Repository: nitrojs/nitro

Length of output: 1454


🏁 Script executed:

# Check if nitropack is a separate dependency or an old name
rg "nitropack" --type json -A 2 -B 2

# Check the package.json to see all dependencies
fd -e json "^package\.json$" -x head -50 {}

# Look for any documentation or comments about nitropack
rg "nitropack" --type md -A 2 -B 2 | head -50

Repository: nitrojs/nitro

Length of output: 12373


Update CLI commands: change npx nitropack to npx nitro in Common Tasks section.

Lines 43, 49, and 55 use npx nitropack, but Nitro v3 renamed the package from nitropack (v2) to nitro (v3). These should be changed to npx nitro dev, npx nitro build, and NITRO_PRESET=cloudflare-pages npx nitro build respectively, to match the Quick Reference section (lines 19, 22) and align with the current CLI.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/nitro/SKILL.md` around lines 17 - 23, In the Common Tasks section
replace the deprecated "npx nitropack" invocations with the updated Nitro v3
CLI: change the snippet that runs the dev server from "npx nitropack" to "npx
nitro dev", change the build command from "npx nitropack" to "npx nitro build",
and change the Cloudflare Pages build invocation from "npx nitropack build" to
"NITRO_PRESET=cloudflare-pages npx nitro build"; locate the three occurrences by
searching for the string "npx nitropack" in the Common Tasks section and update
them to match the Quick Reference examples.

### Run the dev server

```bash
npx nitropack dev
Copy link
Member

Choose a reason for hiding this comment

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

Nitro v3 command is nitro not nitropack

Add a file under `server/api/` or `routes/`:

```ts
// server/api/hello.get.ts
Copy link
Member

Choose a reason for hiding this comment

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

Nitro v3 needs explicit import defineHandler

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.

Skills (nitro & update-deps) could be improved

2 participants