Skip to content

feat: distinguish official skills in palette and ship token-saver skill#1300

Open
xinmu0129 wants to merge 7 commits into
tutti-os:mainfrom
xinmu0129:test.v1
Open

feat: distinguish official skills in palette and ship token-saver skill#1300
xinmu0129 wants to merge 7 commits into
tutti-os:mainfrom
xinmu0129:test.v1

Conversation

@xinmu0129

@xinmu0129 xinmu0129 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

Two related changes around skills in the Agent composer skill palette (the / / $ panel):

1. Distinguish official skills from user-installed skills in the palette

  • Backend (skill_options.go): Reorder skillSourceRank so official skills (system, tutti-injected) rank before user-installed (project, personal, plugin). Remove the blanket hide of all tutti-injected skills, replacing it with a precise name-based hidden list. Add .system skill root for the Claude Code provider (was only present for Codex).
  • Frontend (AgentSlashCommandPalette.tsx): Official skills (system, tutti-injected, bundled) now render with a BadgeCheck icon; user-installed skills keep the existing icon-less style.

2. Ship a new official "token-saver" skill

  • New built-in skill at skill_templates/token-saver.md that instructs the model to use terse, minimal-token responses — inspired by community approaches like the caveman trick.
  • Installed to skills/.system/ so it surfaces as an official skill on both Codex and Claude Code, becoming the first showcase of the official-skill badge from change 1.

Verification

  • go build ./...packages/agent/runtimeprep and services/tuttid both compile clean
  • go test ./... — all skill-related tests pass, including TestDiscoverComposerSkillOptionsCodexUsesProviderNativeTriggers (updated for new sort order)
  • Manual trace through the rendering path: BadgeCheck for official entries, null for user-installed

Checklist

  • I kept the change focused on one concern.
  • I updated documentation when behavior, setup, or contributor workflow changed.
  • I updated all README/CONTRIBUTING language variants when changing their English source.
  • I ran the lowest meaningful local checks for the changed surface.
  • My commits are signed off with DCO when required: git commit -s.

Open in Devin Review

- Backend: rank official skills (system, tutti-injected) before user-installed in palette
- Backend: unhide tutti-injected skills, rely on name-based hidden list instead
- Backend: add .system skill root for Claude Code provider
- Backend: add token-saver built-in skill installed to .system/ directory
- Frontend: show BadgeCheck icon for official skills (system/tutti-injected/bundled)
- Test: add verification tests for skill ranking, hiding logic, and discovery

Signed-off-by: xinmu <1670417475@qq.com>
…t ranking

Signed-off-by: xinmu <1670417475@qq.com>
@tutti-pr-review-bot
tutti-pr-review-bot Bot requested a review from a team July 17, 2026 08:39
@devRickyyy devRickyyy self-assigned this Jul 17, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

installTokenSaverSystemSkill creates skills/.system/token-saver/ as a
legitimate Tutti system skill. The old assertion checked that the entire
.system directory did not exist, which conflicts with token-saver.

Narrow the check to skills/.system/hidden — the specific user skill
that should never be leaked from ~/.codex/skills/.system/ into the
sandbox — rather than forbidding the .system directory entirely.

Signed-off-by: xinmu <1670417475@qq.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Previously hidden by the blanket tutti-injected concealment, these two
internal skills leaked into the Codex skill picker after switching to
name-based hiding:

- tutti-workspace-app-factory
- tutti-agent-workspace-app

Both are app-factory generation internals that users should never see or
trigger directly.

Signed-off-by: xinmu <1670417475@qq.com>
devin-ai-integration[bot]

This comment was marked as resolved.

expectedHidden now covers all 9 hidden skills including
tutti-workspace-app-factory and tutti-agent-workspace-app.
Count check uses len(expectedHidden) to stay self-maintaining.

Signed-off-by: xinmu <1670417475@qq.com>

@devRickyyy devRickyyy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the implementation. Requesting changes for the following verified blockers:

  1. P1: token-saver is unreachable from the AgentGUI composer. The new .system root is only scanned with runtime env, while composer options pass a nil env and session results are discarded. Please add production-path API→GUI coverage.
  2. P1: Claude Code will not register the skill from skills/.system/token-saver/SKILL.md. Preserve the provider-native plugin skill layout/namespace and express official provenance as metadata.
  3. P1: Required Go checks fail. pnpm lint:go reports an unused root parameter and gofmt -d reports formatting changes.
  4. P2: Name-only hiding suppresses user skills with the same names. Visibility must include source/provenance or explicit metadata.
  5. P2: The implementation bypasses runtimeprep’s shared resolver (CapabilityPack/SkillSpec), allowing Prepare and RenderSkillBundle to drift. Please route this through the canonical resolver and add cross-consumer tests.

Focused package tests passed, but they do not cover the production composer/runtime paths above. Please address these findings and rerun the repository lint/format gates.

- Replace .system directory approach with static skill list (officialStaticComposerSkillOptions)
- Change dedup key from Trigger to Name to prevent duplicate entries across different trigger formats
- Add isTuttiSource guard to shouldHideComposerSkill so user skills with coinciding names are never hidden
- Route token-saver through providerSkills() canonical resolver instead of separate installTokenSaverSystemSkill
- Include token-saver in CoreSkillsPack capability for RenderSkillBundle consistency
- Add token-saver to static discovery for nil-env composer API path
- Update tests: skill counts, sort order, sourceKind assertions, cross-provider trigger verification
@tutti-pr-review-bot
tutti-pr-review-bot Bot requested a review from a team July 19, 2026 01:02
devin-ai-integration[bot]

This comment was marked as resolved.

…lision

Replace the single-pass Name-based dedup in discoverProviderSkillRoots
with a two-tier strategy:

Phase 2 — Tutti-controlled skills (system / tutti-injected / plugin+tutti-cli)
dedup by name among themselves. This prevents the same Tutti skill from
appearing twice when discovered from both the static list and a filesystem
root with differing trigger formats (e.g. /token-saver vs /tutti-cli:token-saver
in Claude Code).

Phase 3 — global dedup by trigger. Non-Tutti skills pass through Phase 2
unmodified, so a user or third-party plugin skill that shares a name with a
Tutti official skill survives when its trigger differs. Same-trigger entries
still dedup correctly regardless of source.

Add isTuttiControlledSkillOption helper and a new test
(TestUserSkillNotDroppedWhenNameMatchesTuttiSkill) covering the case
where a third-party Claude Code plugin provides a skill whose name
coincides with a Tutti official skill.
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