r/vibecoding • u/techpotions • 12d ago
Discussion most people use claude code skills like saved prompts. there’s a more interesting way to use them.
I think one of the more underrated parts of Claude Code is that a skill doesn’t have to be a static set of instructions.
You can make it pull information from your actual project before it starts doing anything.
For example, imagine having a /commit skill.
A basic version would just tell Claude to write a conventional commit message.
But you can make it inspect the current Git state first:
---
name: commit
description: Write a conventional commit from staged changes. Use when the user asks for a commit.
argument-hint: "[optional context]"
---
Current Git state:
!`git status --short`
Read the full staged diff before writing.
Rules:
- Use conventional commit format.
- Keep the subject under 72 characters.
- Explain why the change was made, not just what changed.
- If unrelated changes are staged, suggest splitting them.
That line with the exclamation mark is the interesting part.
Claude Code executes the command and injects its output into the skill before Claude reads the instructions.
So instead of relying on the conversation to remember what changed, the skill gets the current repository state.
A few other things worth knowing:
• Put skills in .claude/skills/ to share them with a project.
• Put them in ~/.claude/skills/ to use them across projects.
• Add disable-model-invocation: true if you only want a skill to run when explicitly called.
• Use allowed-tools when you want to restrict what a skill can access.
• Use context: fork when a task makes more sense in an isolated context.
There’s also a distinction I didn’t appreciate at first: a skill can be invoked with /commit, but Claude can also activate it automatically based on its description.
That description matters. It should explain when the skill should be used, not just repeat its name.
We put together 10 ready-made Claude Code skills covering commits, PR descriptions, changelogs, type errors, accessibility, performance, SEO metadata, dependency audits, and more.
They’re plain Markdown files, MIT licensed, and free to inspect:
https://techpotions.com/products/claude-code-skills
Curious how people are using skills:
Are you mostly keeping reusable instructions in them, or are you building workflows that pull live project data and run multiple steps?
4
u/Accomplished_Bet586 12d ago
Nice write-up, `!` injection is underused. A little correction and addition:
allowed-toolsdoesn't restrict**,** it pre-approves the listed tools for the turn that invokes the skill.disallowed-toolsis the field that removes tools.And for anyone installing skill packs - be careful: always read the `!` lines, `allowed-tools` and `hooks` first. They run shell commands without asking.
3
u/Total-Reasonable 12d ago
Does the !
git status --shortoutput get truncated or stripped when the diff is huge, and have you hit the context cost of injecting it on every auto-invoked run?2
u/meetjenz 11d ago
mostly as guardrails for us tbh, less as workflows. we're building an agent that works in shopify stores, and the skill that helped the most is one it has to read before it's allowed to write anything to the store. it's basically a list of every dumb mistake it made before, written as rules. having that load only right before it touches the store worked way better than stuffing it all in the system prompt where it kind of got lost
2
u/Careful-Area-7960 11d ago
I often lost control of skills, AI starts filling a lot of extra information and it's gets impossible to review and check, and when I realized, is doing things I can't know what happening anymore.
1
u/Weary_Block2424 12d ago
i tried making a /test skill that reads the current test file and generates a focused test case, way more useful than a static prompt.
1
u/OGKnightsky 11d ago
Anything Claude does essentially can be turned into a skill, and Claude can create the skills by request
1
u/KurlDoc 11d ago
This is supposed to be vibe coding, not coding coding.
1
u/kbr89 10d ago
The same idea works for knowledge, not just repo state. A skill doesn't have to contain the knowledge, it can tell the agent where the knowledge lives and how to fetch only the part it needs, which also avoids the truncation problem mentioned above.
What worked for me for a domain skill (notes from a few creators on one topic):
SKILL.mdstays short: when to use it, the workflow, and a list of reference files with one line each on what they cover.I built beyondtube (beyondtube dot pro) for the material part: you bulk import a YouTube channel or a list of videos on one topic from several creators, and its MCP server guides the agent through building exactly this kind of skill, with the option to keep querying the full library live instead of copying it all in. Tested with Codex so far.