CCAR-F Claude Code Configuration and Workflows Practice Question
You are a Claude Code user working on a Python project. You want to define a custom slash command named /test that runs your project's test suite. Where should you place the command file so that it is available only within this project?
⚠ Common exam trap
Many exam-takers confuse project-scoped and user-scoped command directories, assuming that any commands folder works regardless of location.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In the .claude/commands/ directory at the root of the project.
Project-scoped custom slash commands must reside in the .claude/commands/ directory at the project root. This ensures the command is only available within that project and can be shared with the team via version control. User-scoped commands go in ~/.claude/commands/, but that would make the command available everywhere, which is not desired here.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
In the .claude/commands/ directory at the root of the project.
Why this is correct
Placing the command file in .claude/commands/ at the project root makes the /test command available only when Claude Code is run within that project. This is the documented location for project-scoped custom slash commands, ensuring they are not exposed globally and can be version-controlled with the project.
- ✗
In the ~/.claude/commands/ directory in the user's home folder.
Why it's wrong here
The ~/.claude/commands/ directory is for user-scoped commands, which are available across all projects on the machine. While this would make /test available, it would also expose it to other projects, violating the requirement that the command be project-specific. Therefore, it is not the correct location.
- ✗
In the project's .github/workflows/ directory as a YAML file.
Why it's wrong here
The .github/workflows/ directory is used for GitHub Actions CI/CD pipelines, not for Claude Code custom commands. Claude Code does not read command definitions from there. Placing a file there would have no effect on the availability of the /test slash command within Claude Code sessions.
- ✗
In a .claude/config.json file at the project root, under a 'commands' key.
Why it's wrong here
Claude Code does not use a config.json file to define slash commands. Custom commands are defined as individual Markdown files in specific directories, not embedded in a JSON configuration. This approach would not be recognized by Claude Code and would fail to create the /test command.
About these practice questions
This CCAR-F question is part of Courseiva's 271-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCAR-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAR-F exam.