Get Started with Claude Code
This past weekend I did a deep dive into Claude Code optimizations.
I learned that SKILL.md handles "here's how to do things" (think best practices and code snippets), while CLAUDE.md is responsible for project-specific information, e.g. "here's what you need to know."
Workflow
- Start with Projects. Define important files and relevant context through iterative conversation with your main agent.
- After some back and forth with Claude, create a skill.
- If the task you just performed needs to be done again, create a subagent.
- To feed information from external sources to your skill or subagent, use an MCP server.
- Enhance Your Workflow with Superpowers.
Projects, aka CLAUDE.md
In any directory, run claude. Once in the interactive session, run /init.
Claude will immediately look for files related to coding. If this is not a coding repository, tell Claude what the purpose of the repository is.
You can provide Claude with links to relevant files that include background knowledge and context that should inform all conversations about a specific project.
- Always be loaded.
- Persist context and keep context separate for different initiatives.
Once it understands what the repository is for, it will store it in CLAUDE.md at the root of the directory.
Context
I was afraid of context when I first started my journey, but you don't have to be. You can tell Claude to save the context to a markdown file, and load it in a new session.
Whenever there's back and forth with Claude -- clarifying assumptions, etc. -- it means it now knows your preferences and implementation details that it was previously unaware of. This is what context is, and it is associated with a single session It goes away when the session is exited.
Slash commands are used within an interactive Claude Code session.
/compact ...
/resume ...
Model Context Protocol (MCP) Servers
CLAUDE.md can be considered high-level context.
You can enhance your context by providing data sources (PDFs, eBooks, blog posts, documentation, code snippets).
MCP servers allow you to connect Claude to an external knowledge base.
- Go to context7.com and create a free account.
- Generate an API key.
- In your terminal, run
claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY_GOES_HERE"
The PoC will be touching several different technologies and I want to ensure we use the latest information prior to implementation.
Use context7 to have the lastest documentation for the most recent version of the Go programming language.
Use context7 to have the lastest documentation for the most recent version of the Linux kernel.
Once you have the updated docs, we will use the writing-plan skill to document what new information was gained.
That is why the /superpowers:write-plan slash command is so powerful once you and Claude agree on the plan. It helps Claude remember what was discussed and can continue even in a new session.
Subagents
Subagents are purpose-built for specific workflows
If a task can be broken down to multiple independent subtasks, create a subagent. Tasks can be processed in parallel -- allowing multiple subagents to work on different aspects simultaneously
Keep the main conversation focused while offloading specialized work
https://code.claude.com/docs/en/sub-agents
Tool restrictions can also be implemented on subagents, limiting their capabilities (e.g., read-only access)
How to create a subagent
Create SKILL.md
Skills are recurring instructions that can be used across multiple conversations.
they make Claude better at specific tasks across all conversations.
If multiple agents or conversations need the same expertise
Use Skills to teach expertise that any agent can apply; use subagents when you need independent task execution with specific tool permissions and context isolation.
MCP connects Claude to data; Skills teach Claude what to do with that data.
MCP for connectivity, Skills for procedural knowledge.
When creating Skills, do it in planning mode. Enter into Plan Mode by pressing Shift+Tab
At this point, prior plan execution, I ask Claude:
Are there any skills that can be developed based on what you learned in this session?
Skills can be used to create Standard Operating Procedures. It seems that they closely relate to Model Context Protocol (MCP) servers, providing the agent with "know-how" on how to execute tasks and best practices.
Skills can also execute scripts, making it ideal for Start Up / Shut Down tasks, as well as Developer Onboarding.
Ways to create skills
Skills can be proactive (blank slate) or reactive (based on #context). Either way is fine. The process of creating a skill is iterative. It will never be perfect on the first run. When you use the skill, and Claude will catch and correct errors. ask Claude to update the skill with the corrections.
I enjoy using the Functional Option Pattern when I write Go code. This repository contains examples of that. Are there any features in Go 1.25 that would be beneficial for this pattern? Use context7.
I'm essentially using this MCP server to create skills.
Enhance Your Workflow With Superpowers
Since Claude Code thrives in the terminal, and files are stored locally, it makes it easy to share workflows with others. Take the obra/superpowers repository for example.
Run these two commands:
/plugin marketplace add obra/superpowers-marketplace
/plugin install superpowers@superpowers-marketplace
Then, as you approach a new project, start with /superpowers:brainstorm to share what you're trying to accomplish.
Example of skills:
- This is how I like to structure my sentences
- This is how I approach certain tasks
- Run this code to accomplish xyz
- Use this framework to analyze xyz
- CNF Development and Best Practices
- Guidelines & Best Practices
- Job to be Done Framework
- Critical Decision Making Framework
To create a skill:
-
Hey, we're going to use eBPf to Develop a CNF (Cloud-Native Network Function).
-
Hey, we're going to configure Cilium using a helm chart. We need to suport these features:
-
Prompt: I'd like to create a new skill. XYZ..
-
During an interactive session, when the task is complete, ask Claude to create a skill based on the discussion. Each time I use the skill, ask it to remember adjustments.
Tell Claude: this is how I do things. Here are a few examples.
This requires me to break down into context-friendly concepts. Training wheels for AI. This also proves (validates) I know what I want to do.
CLAUDE.md
- Critical universal rules
- Points to repo-specific claude.md files
- References skills for detailed guidelines
- Terminal commands
- Task management workflow (dev docs system)
Each repositority has its own CLAUDE.md, which includes repo-specific quirks and commands, as well as a "Quick Start" section that points to:
- PROJECT_KNOWLEDGE.md - Architecture & integration
- TROUBLESHOOTING.md - Common issues
- Auto-generated API docs
How I applied this..
- I have a general
~/codedirectory. I updated to ... - Created a directory for business related projects.
- I updated
.gitignorewithCLAUDE.md. -- How do I save this in git? I can create~/code/CLAUDEwith.md's for each project. Create a symlink (hard or soft?) into the repository asCLAUDE.md. - Download gh cli tool:
brew install ghthengh auth login.
Applied Learning
"Ask me as many questions as you need to make sure we're on the same page"
File location: ./.claude/skills/
If you do not need the MCP server in your current session, disable it.
"Use your best judgement"
Have Claude review its own code
Each task can be an agent. E.g.
- Architecture Review
- Building the code/project (think xCNFs)
- Documentation scribe
The key with agents is to give them very specific roles and clear instructions on what to return.
https://context7.com/ is aware of Linux, Cilium, eBPF, Talos, C#, Go, and Rust. I need to make it aware of https://rfc-editor.org
Principles
- It's wise to use
gitrepository to version control all changes related to Claude. - Always start new sessions in planning mode. Enter into Plan Mode by pressing Shift+Tab
- Edit ~/.claude/settings.json to contain:
{
"permissions": {
"defaultMode": "plan"
}
}