feat: distinguish official skills in palette and ship token-saver skill#1300
Open
xinmu0129 wants to merge 7 commits into
Open
feat: distinguish official skills in palette and ship token-saver skill#1300xinmu0129 wants to merge 7 commits into
xinmu0129 wants to merge 7 commits into
Conversation
- 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>
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>
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>
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
requested changes
Jul 18, 2026
devRickyyy
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the implementation. Requesting changes for the following verified blockers:
- P1:
token-saveris unreachable from the AgentGUI composer. The new.systemroot 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. - 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. - P1: Required Go checks fail.
pnpm lint:goreports an unusedrootparameter andgofmt -dreports formatting changes. - P2: Name-only hiding suppresses user skills with the same names. Visibility must include source/provenance or explicit metadata.
- 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
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
skill_options.go): ReorderskillSourceRankso official skills (system,tutti-injected) rank before user-installed (project,personal,plugin). Remove the blanket hide of alltutti-injectedskills, replacing it with a precise name-based hidden list. Add.systemskill root for the Claude Code provider (was only present for Codex).AgentSlashCommandPalette.tsx): Official skills (system,tutti-injected,bundled) now render with aBadgeCheckicon; user-installed skills keep the existing icon-less style.2. Ship a new official "token-saver" skill
skill_templates/token-saver.mdthat instructs the model to use terse, minimal-token responses — inspired by community approaches like the caveman trick.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/runtimeprepandservices/tuttidboth compile cleango test ./...— all skill-related tests pass, includingTestDiscoverComposerSkillOptionsCodexUsesProviderNativeTriggers(updated for new sort order)BadgeCheckfor official entries,nullfor user-installedChecklist
git commit -s.