Skip to content

feat(skills): render full instructions in settings - #1158

Merged
agegr merged 3 commits into
agegr:mainfrom
tammelin:feat/skill-instructions-preview
Oct 11, 2026
Merged

agegr merged 3 commits into
agegr:mainfrom
tammelin:feat/skill-instructions-preview

Conversation

@tammelin

@tammelin tammelin commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Skills settings panel currently shows only a skill's name and frontmatter description. The actual instructions in the body of SKILL.md are not visible, so reviewing what an installed or project skill tells the agent to do requires locating and opening the file outside Pi Web.

Changes

  • add an Instructions section to the selected skill's detail pane
  • render the post-frontmatter SKILL.md body with Pi Web's existing sanitized Markdown renderer, including headings, lists, tables, and code blocks
  • load content only when a skill is selected instead of adding every skill body to the list response
  • authorize reads against the skills returned by the runtime resource loader, preserving project trust and preventing the endpoint from becoming a general filesystem reader
  • limit skill files to a 1 MiB API response and show localized loading, empty, and error states

Screenshot

Formatted skill instructions in the Skills settings panel

Verification

  • npm run lint — passed
  • npx tsc --noEmit — passed
  • node --experimental-strip-types --test app/api/skills/content/route.test.mjs components/SkillsConfig.instructions.test.mjs — passed
  • npm test — 2,850 passed, 1 skipped, and 1 unrelated environment-specific failure: the existing read-only-directory case in lib/rotate-preview-secrets.test.mjs runs as root in the local container, which can write through chmod 0500
  • Manually verified formatted instructions in desktop Chromium and iPad Safari

@agegr

agegr commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Thanks @tammelin, this is a nice, contained addition: read-only, loaded only for the selected skill, and the route's allow-list is the runtime loader's own skill list, so it cannot be used to read other Markdown files.

What I checked on an isolated server: a skill with headings, a nested list, a table and a code block renders as in the chat; a skill with only frontmatter shows "This skill has no instructions."; /api/skills/content answers 404 "Skill not found" for /etc/hosts and 403 for a cwd outside the allowed roots; after the list has loaded, the content request takes 15–125 ms.

Merged with current main (no conflicts): tsc, lint and the full test suite pass. Nothing else needed from you.

agegr and others added 2 commits October 11, 2026 17:10
Next's route type check accepts only HTTP handlers and route config as
exports, so next build failed on SKILL_CONTENT_MAX_BYTES.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@agegr
agegr merged commit ae34240 into agegr:main Oct 11, 2026
2 checks passed
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 6, 2026
* feat(skills): render full instructions in settings

* style(skills): drop the box and background around skill instructions

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(skills): keep the content size limit out of the route's exports

Next's route type check accepts only HTTP handlers and route config as
exports, so next build failed on SKILL_CONTENT_MAX_BYTES.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 8, 2026
* feat(skills): render full instructions in settings

* style(skills): drop the box and background around skill instructions

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(skills): keep the content size limit out of the route's exports

Next's route type check accepts only HTTP handlers and route config as
exports, so next build failed on SKILL_CONTENT_MAX_BYTES.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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