The "Father of Lobster" Teaches You to Save Money: Open Source Skills and Slim Down Your Skills
The skill levels vary widely, and Peter, the "Father of Lobster", can't stand it anymore.
Everyone: Don't write skill descriptions like a book and stuff all kinds of messy things into the context.
To solve this problem, he wrote a skill to conduct a "physical examination" on all skills and open - sourced it for everyone.
This view resonated with netizens in the comment section.
Some people mentioned that when the skill description was over 90 words, the agent couldn't call the skill properly. After reducing it to less than 40 words, the agent selected the skill correctly at once.
So, should your skill also have a "physical examination"?
The "Father of Lobster" Cleans Up Skills
The problem with skill prompts seems to be about the length of the copy, but actually it affects the runtime cost.
For each additional description, the agent has to pay an extra token bill every time it makes a call.
The more information the agent sees, the more noise there is when making a choice. Latency, cost, and attention are all involved.
The "Father of Lobster" advocates that skills should be like road signs.
The purpose is to let the agent find the way, and the whole instruction manual shouldn't be hung on the road sign.
His open - sourced skill - cleaner sets an example in this style.
The Skill.md only has 56 lines of prompts.
The called script has nearly a thousand lines of code.
Think about it again. Skill.md is the road sign, and the code is the instruction manual.
This skill has 5 core functions.
1. Skill prompt budget audit calculation
Analyze the proportion of the budget occupied by the context token space used by the skill, and provide a budget optimization plan to avoid skills occupying too many context resources.
2. Duplicate skill detection
Across the Codex built - in library, plugin cache, code library, and personal skill root directory, scan for skills with the same name and duplicate skills with highly similar descriptions/contents, and mark redundant items.
3. Unused skill screening
Based on historical logs, identify idle skills that have not been called, mentioned, or used for a long time, and provide a candidate list for cleaning.
4. Skill root directory audit
Count the source root directories of all skills, mark the enabled/disabled status, and sort out the skill loading links.
5. Description simplification and optimization
Find long - winded skill descriptions, and recommend compressing the length by simplifying the syntax to save the prompt budget.
When you run a test, the result is probably like this:
The workflow of each function is divided into three steps.
1. Execute the analysis script
Run the Node.js script in the skill directory/repository root directory (supports custom parameters: time range, log depth, budget threshold, custom root directory, etc.).
2. View the audit report
Read the core reports in order: skill budget → description optimization items → duplicate skills → unused skills → root directory summary.
3. Safe cleaning/editing
Give priority to retaining Codex built - in skills, delete local/duplicate copies; retain the core operation and maintenance skills of the repository; do not delete unconfirmed irrelevant directories, and verify the validity of retained files before modification.
There are still a few details in the script worth analyzing.
The script uses the same prompt budget accounting logic as the official Codex source code. It first reads the local model cache configuration to obtain the GPT - 5.5 context window parameter, with a default of 272k tokens.
Strictly follow the Codex billing rules (round up the number of UTF8 bytes/4). Take 2% of the model context as the default skill budget base, and combine the skill priority sorting rules (system skills > built - in skills > plugin skills > repository custom skills) to calculate the original occupied tokens, minimum rendering tokens, and available tokens within the budget for all skills.
At the same time, it can simulate real - world running scenarios, calculate the number of truncated characters in the skill description and the number of omitted skills when the budget is insufficient, and accurately output core indicators such as budget utilization rate, remaining budget, and context occupation ratio, intuitively showing the resource load of the skill system.
Specifically, simplifying the skill description is also divided into three steps
- Text pre - processing, unify the format, convert all to lowercase, remove punctuation marks, etc.
- Built - in preset scenario keyword library to identify the business field of the skill
- After matching the scenario, call the preset standardized short action phrases to replace the original long - winded description
For example, debugging category → debug, inspect, fix; deployment and release category → deploy, release, verify; retrieval and archiving category → search, sync, summarize
Finally, it looks like this.
Even Peter himself started speaking in this "caveman" style in the post's comment section:
He really has the concept of saving tokens deeply ingrained.
install skill
agent smart
user happy
GitHub: https://github.com/steipete/agent - scripts/tree/main/skills/skill - cleaner
Reference link: [1]https://x.com/steipete/status/2058917897590673525
This article is from the WeChat official account "QbitAI", author: Meng Chen. Republished by 36Kr with authorization.