mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-03-12 17:51:53 +08:00
chore: sync content to repo (#9626)
Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3bd5767dbe
commit
102d565028
@@ -1,3 +1,8 @@
|
||||
# claude --add-dir
|
||||
|
||||
The `claude --add-dir` command is a startup flag that allows you to include extra folders in your working session before the interface even opens. By providing one or more directory paths when you launch the tool (for example, `claude --add-dir ../library --add-dir ./docs`), you grant the assistant permission to read and modify files in those external locations alongside your current project. This is particularly useful for cross-repository tasks, such as updating a shared library and its dependent application simultaneously, as it ensures the AI has a unified view of all relevant codebases from the very first prompt.
|
||||
The `claude --add-dir` command is a startup flag that allows you to include extra folders in your working session before the interface even opens. By providing one or more directory paths when you launch the tool (for example, `claude --add-dir ../library --add-dir ./docs`), you grant the assistant permission to read and modify files in those external locations alongside your current project. This is particularly useful for cross-repository tasks, such as updating a shared library and its dependent application simultaneously, as it ensures the AI has a unified view of all relevant codebases from the very first prompt.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@official@CLI flags](https://code.claude.com/docs/en/cli-reference#cli-flags)
|
||||
- [@official@Load memory from additional directories](https://code.claude.com/docs/en/memory#load-memory-from-additional-directories)
|
||||
@@ -1,3 +1,9 @@
|
||||
# Prompt Caching
|
||||
|
||||
Prompt caching in Claude Code is a performance-optimizing feature that stores the frequently used "prefixes" of your conversations—such as your entire codebase state, system instructions, and tool definitions—so they don't have to be reprocessed from scratch with every new message. In an agentic environment where Claude often re-reads your files multiple times to maintain context, caching acts as a "checkpoint" system: while the initial write to the cache carries a slight premium, every subsequent interaction that reuses that prefix receives a 90% discount on input tokens and up to an 85% reduction in latency. Claude Code handles this automatically by placing "cache breakpoints" at strategic points in the prompt (like after your [CLAUDE.md](http://CLAUDE.md) and project structure), ensuring that even as your conversation grows, the "static" foundation of your project remains instantly accessible and cost-effective.
|
||||
Prompt caching in Claude Code is a performance-optimizing feature that stores the frequently used "prefixes" of your conversations—such as your entire codebase state, system instructions, and tool definitions—so they don't have to be reprocessed from scratch with every new message. In an agentic environment where Claude often re-reads your files multiple times to maintain context, caching acts as a "checkpoint" system: while the initial write to the cache carries a slight premium, every subsequent interaction that reuses that prefix receives a 90% discount on input tokens and up to an 85% reduction in latency. Claude Code handles this automatically by placing "cache breakpoints" at strategic points in the prompt (like after your [CLAUDE.md](http://CLAUDE.md) and project structure), ensuring that even as your conversation grows, the "static" foundation of your project remains instantly accessible and cost-effective.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@official@Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
||||
- [@official@Prompt caching configuration]](https://code.claude.com/docs/en/model-config#prompt-caching-configuration)
|
||||
- [@article@Unlocking Efficiency: A Practical Guide to Claude Prompt Caching](https://medium.com/@mcraddock/unlocking-efficiency-a-practical-guide-to-claude-prompt-caching-3185805c0eef)
|
||||
@@ -1,3 +1,12 @@
|
||||
# Skill Best Practices
|
||||
|
||||
When configuring Claude Code skills, the primary best practice is to optimize for discoverability and context efficiency by using precise YAML frontmatter and "lazy loading." Your skill's `description` should act as a clear semantic trigger, using specific keywords that help Claude identify exactly when to activate the expert instructions without bloating the context window of every conversation. Structure the `SKILL.md` with a narrow, modular focus rather than creating a "Swiss Army Knife" skill; if a workflow has non-negotiable side effects, use `disable-model-invocation: true` to ensure it only runs when manually triggered via a slash command. Additionally, leverage argument placeholders (like `$ARGUMENTS`) to make your skills reusable across different files, and store them in the project’s `.claude/skills/` directory so they are version-controlled and shared with your team. Finally, keep skill instructions deterministic by providing step-by-step tool sequences, which ensures Claude follows your project’s "golden path" for complex tasks like deployments or security audits.
|
||||
When configuring Claude Code skills, the primary best practice is to optimize for discoverability and context efficiency by using precise YAML frontmatter and "lazy loading." Your skill's `description` should act as a clear semantic trigger, using specific keywords that help Claude identify exactly when to activate the expert instructions without bloating the context window of every conversation. Structure the `SKILL.md` with a narrow, modular focus rather than creating a "Swiss Army Knife" skill; if a workflow has non-negotiable side effects, use `disable-model-invocation: true` to ensure it only runs when manually triggered via a slash command. Additionally, leverage argument placeholders (like `$ARGUMENTS`) to make your skills reusable across different files, and store them in the project’s `.claude/skills/` directory so they are version-controlled and shared with your team. Finally, keep skill instructions deterministic by providing step-by-step tool sequences, which ensure Claude follows your project’s "golden path" for complex tasks like deployments or security audits.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@official@Create skills](https://code.claude.com/docs/en/best-practices#create-skills)
|
||||
- [@official@Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
||||
- [@official@The Complete Guide to Building Skills for Claude](https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf?hsLang=en)
|
||||
- [@article@A useful cheatsheet for understanding Claude Skills](https://www.reddit.com/r/ClaudeAI/comments/1qbpe91/a_useful_cheatsheet_for_understanding_claude/)
|
||||
- [@article@Writing Claude Skills That Actually Work: A Guide to What Works (And What Doesn’t)](https://medium.com/@creativeaininja/writing-claude-skills-that-actually-work-a-guide-to-what-works-and-what-doesnt-2dfcd9593106)
|
||||
- [@video@Claude Code Skills are INSANE (and you’re not using them correctly](https://www.youtube.com/watch?v=thxXGxYIwUI)
|
||||
Reference in New Issue
Block a user