A collection of coding rules, templates, MCP servers and examples for working with Agentic Coding tools (Cline, Claude Code etc...)
- MCP DevTools: This has become the only MCP server I always have enabled. I wrote it to provide the most common tooling I use with Agentic Coding.
- See my blog post on my Setup -> Plan -> Act -> Review & Iterate workflow at: smcleod.net
Note: My rules starting with an _
indicate that I only toggle these on for specific scenarios and they are disabled by default.
- Agent Rules
- Workflows (Prompt Templates)
- Amazon Kiro Specific Rules (Mainly as Kiro seems to over-complicate and over-engineer everything).
- Cline Docs on Rules
- Using pseudo-XML for your rules can help LLM adherence
- LLMs are trained on a lot of structured data (such as XML), see this blog post for more information.
- On many occasions I have been given feedback that after simply changing rules XML like structure - the LLM closer adheres to them.
- Only enable the rules you actually want to use
- Think about the signal to noise ratio of your rules (and context in general), how much information could you be told at once and remember?
- If you have a lot of rules that are not relevant to the current task, then you're just adding noise and misleading the prediction engine, while increasing the token count.
- Do not blindly import and enable all my (or anyone else's) rules!
- Be clear, concise and specific in your rules. Avoid ambiguity
- Use emphasis (e.g.
**bold**
,*italic*
,__underline__
) to highlight important parts of your rules. - As well as global rules, consider adding project specific rules such as
.clinerules
,CLAUDE.md
or similar that relate to repository specific behaviour (e.g. "To build the application, you must runmake build
etc.)- I have an example of what these might look like in Cline/Rules/adhoc/_repo-specific-rules.md.
- Rules are often transferable between agentic coding tools
- While I write a lot of my rules in Cline, for 95% of them there's no reason they can't be used with other Agentic Coding tools such as Claude Code etc. without modification.
- Get AI to help you write or improve rules
If you spend a long time on a difficult problem with a coding agent and you finally crack it - get it to:
- Summarise the fix
- Why previous attempts did not work
- What led them down the wrong paths initially
- Get them to write a concise, clear rule (prompt) that could be used in the future (or added to your global rules if it's a common issue) to prevent the issue from happening again or at least aid with debugging.
Example:
YOU FIXED IT!!! Finally! That's taken a VERY long time to fix. Can you please respond with details on:
- What the fix was
- Why it wasn't picked up earlier
- What information could I have provided to AI coding agents in the future - not just for this project but also other projects in general? With those in mind I would like you also like you to create a 1 to 3 sentence prompt I can provide to future AI coding agents that would help them avoid having similar issues in the future.
- Blog - smcleod.net
- GitHub - sammcj
- Cline: IMO The best agentic coding tool.
- This repository is licensed under the Apache 2.0 License.