Skip to content

Adding a token counting script#11

Merged
joehan merged 1 commit intomainfrom
jh-ls
Feb 19, 2026
Merged

Adding a token counting script#11
joehan merged 1 commit intomainfrom
jh-ls

Conversation

@joehan
Copy link
Member

@joehan joehan commented Feb 18, 2026

Added a simple token counting script so we can easily track the token impact of changes. In a follow up PR, I'll set up a GH action to automatically run this on each PR.

Screenshot 2026-02-18 at 10 01 29 AM

const skillName = path.basename(skillPath);

// Calculate local
const localStats = await analyzeSkill(skillPath, null, null);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: the countTokens SDK call is an RPC so may be slow(ish) - this could be slightly faster with a start all and awaitAll type of thing

Though with <10 skills this should be <2 seconds assuming 100ms round trip

@joehan joehan merged commit 88c0f8e into main Feb 19, 2026
2 checks passed
@joehan joehan deleted the jh-ls branch February 19, 2026 00:45
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