feat(cli): add static Skill token management commands
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
No implementation files or tests are named. Start by locating the existing CLI command registration and JSON-output paths, then map the scan and non-destructive Git-read entry points; done means all four commands meet the stated acceptance criteria without evals, LLM calls, network access, or file edits.
Written by the indexing model from the issue text.
Description
Background
skill-up can report runtime token usage after eval run, if the agent engine provides token numbers. But this is different from the static size of a Skill itself.
For Skill authors, it is useful to know the token size of SKILL.md, references, scripts and other source files before running eval. This can help to control context size, detect token growth in PR, and find which files or sections are too large.
Proposal
Add a new command group:
skill-up tokens count [paths...]
skill-up tokens profile [path]
skill-up tokens compare [ref-or-path] [paths...]
skill-up tokens suggest [paths...]
This should be static Skill source token management. It should not run evals, should not call agent, and should not call LLM.
Scope
tokens count
- scan Skill source assets
- print per-file estimated_tokens
- print total estimated_tokens
- support multiple paths and avoid duplicate counting
tokens profile
- show the biggest token contributors
- support file level, directory level and Markdown section level profile
- non-Markdown text files can be counted as whole file
tokens compare
- compare current workspace with git ref, for example:
skill-up tokens compare main --skills
- also support comparing with another path or directory
- report added/removed/changed/unchanged token delta
- support max total budget or max token growth gates
tokens suggest
- print deterministic suggestions only
- do not modify files
- find possible problems like:
- oversized sections
- duplicated paragraphs or headings
- long code blocks
- generated or noisy files
Design notes
- First version can use built-in lightweight estimator, not model tokenizer
- Use field name
estimated_tokens, because it is estimate, not provider billing tokens - Keep it separate from runtime
input_tokensandoutput_tokens - Default scan should exclude:
- evals/
- .git/
- cache/build/workspace outputs
- binary files
- oversized files
- Git ref compare should use non-destructive reads like
git ls-treeandgit show. It should not checkout or reset user workspace.
Non-goals
- Do not auto edit Skill files
- Do not call LLM for suggestions
- Do not require network access
- Do not mix static Skill estimate with runtime usage tokens
Acceptance criteria
skill-up tokens count skills/my-skillprints per-file and total estimatesprofilecan show large Markdown sectionscompare main --skillscan show token increase/decrease and fail by thresholdsuggestprints deterministic reduce suggestions- all four subcommands support JSON output
- skipped binary/oversized files have skip reason in JSON output
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 134
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 61
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alibaba/skill-up
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
OpenSandbox runtime: expect.files_exist and file_contains fail because WorkspacePath is remotePossibly taken @bababoom721 claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
alibaba/skill-up#408 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
alibaba/skill-up#407 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
alibaba/skill-up#406 · 1 comment ·
Maintainers usually reply within 1 day
All issues in alibaba/skill-up
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OneBusAway/maglev#2145 ·
Maintainers usually reply within 2 days
-
priority/medium status/ready type/chore
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
discobox-ai/discobox#1357 ·
Maintainers usually reply within 1 day
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itPossibly taken @fzn0x claimed this today. Openbug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
edit_file diff rendering panics on invalid UTF-8 textPossibly taken @TDnorthgarden claimed this today. Openarea/tui
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docker/docker-agent#4955 ·
Maintainers usually reply within 1 day
-
enhancement ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jbigler/railswitch#243 ·
Maintainers usually reply within 1 day