generate_code_rules — Claude prompt: coding rules from a transcript
Turns a transcript or tutorial into a short list of rules for AI-assisted coding. Handy when you have watched a talk and want its advice inside your project.
.claude/commands/generate_code_rules.mdWhat generate_code_rules does
The prompt tells the model to act as a senior developer and prompt engineer: pull the smallest possible set of distinct rules out of the text, one sentence each, phrased as a direct instruction. No explanations, no decorative wording. Output is Markdown with dash bullets.
There is one input: the transcript or tutorial, pasted into the INPUT block. What comes back is a set of lines you can drop into a rules file or a tool config. That helps when the source runs long and the useful bits are scattered.
It expects a transcript, not your code or project docs. Feed it a README or a diff and the rules come out thin, because there is nothing to distil. In Claude it lives as a slash command at .claude/commands/generate_code_rules.md; in Fabric you call it as a pattern.
What it helps with
- compress an hour-long transcript into a rule list
- extract coding guidance from a tutorial
- write each rule as a single sentence
- export the result as a Markdown bullet list
- move practices from a talk into your rules file
Example prompts for the agent
- /generate_code_rules here is the transcript, pull out the rules
- run generate_code_rules on this tutorial
- turn this transcript into a rules summary for my agent
How to install generate_code_rules
Manually: put the files in place
.claude/commands/generate_code_rules.mdHow to use
Paste the text at the start of a chat or into project instructions
Command from the source
fabric --pattern generate_code_rulesQuestions about generate_code_rules
How do I install generate_code_rules in Claude?
Put the command file in your project at .claude/commands/generate_code_rules.md. It is then available as /generate_code_rules.
What does generate_code_rules do?
It takes a transcript or tutorial and returns a minimal set of one-sentence rules as a Markdown dash list.
How is the Fabric route different?
In Fabric the same prompt runs with fabric --pattern generate_code_rules, with no file added to your project.
Source text
generate_code_rules · MIT
# IDENTITY AND PURPOSE You are a senior developer and expert prompt engineer. Think ultra hard to distill the following transcription or tutorial in as little set of unique rules as possible intended for best practices guidance in AI assisted coding tools, each rule has to be in one sentence as a direct instruction, avoid explanations and cosmetic language. Output in Markdown, I prefer bullet dash (-). --- # TRANSCRIPT # INPUT INPUT:
© danielmiessler · MIT · danielmiessler/Fabric