Anthropic CCA-F Practice Test 31
Question 300
A /fix-tests command reports success even when the test suite exits nonzero. What should its workflow require?
- Explicit dependencies and verified results from the invoked skill before declaring completion
- Check the actual test exit status and return failure evidence on nonzero results
- Version and test reusable command workflows against the current CLI interface
- Limit the skill's allowed tools to the necessary read operations
Explanation
Correct Answer
B:A model-generated statement that a job passed cannot substitute for the actual test or deployment output. The controller should check the command's exit status, inspect required artifacts and validate that the changes satisfy the acceptance conditions. A reported success without those receipts is especially unsafe in automated code changes, where a failing test can be hidden by fluent prose.
Incorrect Answers
A:Chaining reusable skills creates a workflow. This is not a substitute for “Check the actual test exit status and return failure evidence on nonzero results”; that control is necessary in the stated circumstances. A reported success without those receipts is especially unsafe in automated code changes, where a failing test can be hidden by fluent prose.
C:Commands encode assumptions that can become outdated. This capability does not directly base command status on actual validation results. Updating CLI documentation does not force a command wrapper to check a process's actual nonzero exit code. Inspect and propagate the real test outcome as a failure.
D:A skill definition should express not just instructions but permitted capabilities. That addresses a different part of the system, not the requirement to base command status on actual validation results.
Question 301
A security-review skill returns free-form paragraphs that cannot be parsed by the issue tracker. What improvement helps?
- Explicit dependencies and verified results from the invoked skill before declaring completion
- Define a structured finding schema including severity, file path and remediation
- Package necessary scripts and references in a stable project-accessible location
- Run the skill in an isolated forked context when supported
Explanation
Correct Answer
B:A typed output makes subsequent automation reliable and auditable. The skill can still explain findings but should preserve machine-readable fields. A finding schema should specify fields such as severity, file path, evidence and suggested remediation. A typed result lets the issue tracker validate and route findings without parsing free-form prose.
Incorrect Answers
A:Verifying the completion of an invoked skill prevents premature success claims, but the issue tracker cannot parse the security review's free-form findings. Define an output schema with severity, path, evidence and remediation fields; a success flag without structured finding data would not solve ingestion.
C:Packaging scripts correctly solves missing execution dependencies, but the security-review skill already runs and returns unstructured prose. Its downstream issue tracker needs a machine-readable finding contract and schema validation, not a different repository location for the skill's helper files.
D:A forked execution context can keep verbose review steps from overwhelming the parent task. The decisive requirement here is to standardize skill output for downstream processing.
Question 302
A deprecated custom command still uses removed API flags after a tooling update. What should maintainers do?
- Check the actual test exit status and return failure evidence on nonzero results
- Limit the skill's allowed tools to the necessary read operations
- Version and test reusable command workflows against the current CLI interface
- Extract shared validation guidance into one canonical reference and link from the commands
Explanation
Correct Answer
C:Commands encode assumptions that can become outdated. Continuous testing prevents obsolete flags from silently breaking a shared process. Treat the reusable workflow as versioned automation and run it against the supported CLI before rollout. Removed flags may fail silently or change behavior if the team only reads the old command description.
Incorrect Answers
A:A model-generated statement that a job passed cannot substitute for the actual test or deployment output. The direct remedy is “Version and test reusable command workflows against the current CLI interface”, which the alternative does not itself accomplish. Removed flags may fail silently or change behavior if the team only reads the old command description.
B:A skill definition should express not just instructions but permitted capabilities. The scenario instead requires a way to maintain custom commands as tested operational assets.
D:Centralizing duplicate lint guidance prevents checklist drift, but it cannot repair a reusable command that still calls removed CLI flags. Version-test the command against the installed interface and update the obsolete arguments before the workflow is offered to users.
Question 303
The compliance team needs the same audit skill but should not have access to developer deployment credentials. What architecture fits?
- Run the skill in an isolated forked context when supported
- Require and validate an explicit environment argument before taking action
- Share the skill logic while granting different approved tool sets by role
- Create a reusable custom command or skill accepting the release identifier
Explanation
Correct Answer
C:Reusable instructions need not imply identical permissions. Tool access should reflect each user's authorization and workflow risk. Separate reusable analysis logic from the tool permissions granted to each role. A compliance specialist can run shared checks without inheriting the deployment capabilities available to developers.
Incorrect Answers
A:A forked execution context can keep verbose review steps from overwhelming the parent task. This capability does not directly reuse procedures without copying excessive authority.
B:Defaulting a consequential action from missing parameters is unsafe. That addresses a different part of the system, not the requirement to reuse procedures without copying excessive authority.
D:A release-ID command is reusable for repetitive release tasks, but the compliance team's issue is permission isolation. Keep the common audit methodology while provisioning restricted credentials and tool capabilities for the compliance role; do not give it deployment secrets merely to share a command.
Question 304
A production deployment skill should run only when an operator explicitly types /deploy. Claude currently launches it automatically after code changes. Which SKILL.md setting prevents that automatic invocation?
- Set user-invocable: false in the skill frontmatter
- Set context: fork while leaving invocation controls at their defaults
- Add allowed-tools: Bash to the skill frontmatter
- Set disable-model-invocation: true in the skill frontmatter
Explanation
Correct Answer
D:Anthropic documents disable-model-invocation: true for actions with side effects, including /deploy. It prevents Claude from triggering the skill on its own while retaining explicit /deploy invocation by the user. Keep runtime tool permissions and deployment authorization in place as separate controls; the frontmatter governs who initiates the skill, not whether every command is safe.
Incorrect Answers
A:The user-invocable: false setting does the opposite of the requested restriction: it hides the slash-command entry point from the user while leaving Claude able to invoke the skill as context. For a deployment that requires an explicit human command, retain user invocation and disable model-initiated invocation instead.
B:The context: fork setting runs a skill in an isolated subagent context and can protect the main conversation from task-specific context. It does not by itself stop Claude from choosing to invoke the skill automatically. Execution isolation and invocation authorization solve different problems.
C:The allowed-tools field can preapprove certain tool uses while a skill is active; it does not decide whether Claude may invoke the skill. Granting Bash to a production deployment workflow may even expand its execution surface. Use the dedicated invocation-control frontmatter rather than a tool permission shortcut.
Question 305
A skill needs a descriptive entry point and accepted arguments. Which command or skill design meets the requirement?
- Use a SKILL.md with clear frontmatter and argument guidance
- Configure the skill or delegated context for a fork when supported
- Specify a restricted allowed-tools set for the reusable workflow
- Store it in an appropriately shared skill scope rather than copying divergent versions
Explanation
Correct Answer
A:When a skill needs a descriptive entry point and accepted arguments, the system should use a SKILL.md with clear frontmatter and argument guidance. Skill metadata documents how to invoke the capability and what input it expects. Keep the planned diff and tests scoped to the owning module and its actual dependencies.
Incorrect Answers
B:Isolation preserves the main conversation and lets the task operate with scoped context. Here, a skill needs a descriptive entry point and accepted arguments. Use a SKILL.md with clear frontmatter and argument guidance. Skill metadata documents how to invoke the capability and what input it expects.
C:Restricting a skill’s tools controls what it may execute, but it does not document how the skill should be invoked or which arguments are expected. Define the skill entry point and argument guidance in SKILL.md frontmatter and instructions; permissions should be scoped separately.
D:A single maintained source reduces inconsistent procedures across projects. The direct remedy is “Use a SKILL.md with clear frontmatter and argument guidance”, which the alternative does not itself accomplish. Skill metadata documents how to invoke the capability and what input it expects.
Question 306
A reusable Claude Code skill contains 400 lines of detailed examples, but most invocations need only its short procedure and one reference page. What packaging pattern avoids loading every example on each invocation?
- Insert every example directly into SKILL.md because detailed content must always be preloaded
- Remove example evidence altogether and instruct the model to improvise undocumented behavior
- Keep SKILL.md concise and link supporting reference and example files that can be read only when relevant
- Duplicate the examples into each user prompt and do not reference the skill directory
Explanation
Correct Answer
C:Claude Code skills support supporting files alongside SKILL.md. The SKILL.md entry point can state the essentials and point to focused reference.md or examples.md files, which the agent reads when a task requires them. That reduces unnecessary initial context while retaining explicit, inspectable instructions and examples.
Incorrect Answers
A:A massive mandatory SKILL.md increases context use even when only a small part of its examples is needed. Adding more unconditional text is counterproductive. Keep the entry point focused and move large reference detail into files retrieved when appropriate.
B:Removing examples entirely sacrifices a useful evidence base for unusual cases and can encourage unsupported guesses. The design goal is selective loading, not eliminating curated guidance. Keep the accurate examples available as supporting resources and load only the ones a task needs.
D:Copying all examples into each user request repeats the very context overhead this design is trying to avoid. It also bypasses the centrally maintained version of the examples. Refer to the skill’s supporting files by relative path and let the agent open the relevant content on demand.
Question 307
A custom command may read files but must not run shell scripts. What should change in the skill configuration?
- Store it in an appropriately shared skill scope rather than copying divergent versions
- Declare a clear argument hint and validate that argument in the workflow
- Enforce a deny rule or restrictive runtime permission mode that prevents shell execution while keeping the skill’s authorized read operations available
- Write deterministic steps and verifiable success criteria for the skill
Explanation
Correct Answer
C:A skill that may inspect files but must never run scripts needs an enforceable tool boundary, not only a descriptive role label. In Claude Code, an allowed-tools declaration can preapprove named tools without universally denying every omitted capability. Configure an explicit denial for Bash or an appropriately restrictive permission mode, test the effective permissions, and allow the required read operations separately.
Incorrect Answers
A:A single maintained source reduces inconsistent procedures across projects. The direct remedy is “Enforce a deny rule or restrictive runtime permission mode that prevents shell execution while keeping the skill’s authorized read operations available”, which the alternative does not itself accomplish. Skill allowed-tools lists may grant preapproval rather than a deny-all boundary, so actual permission enforcement is needed.
B:Naming the expected inputs of a reusable command improves clarity but does not enforce the prohibition on shell scripts. To keep read operations while preventing command execution, configure an effective deny rule, restrictive permission mode or host authorization check for Bash and other mutation tools.
D:Specific requirements make repeated runs more consistent and easier to review. Here, a custom command may read files but must not run shell scripts. Apply enforceable tool denial or restrictive execution permissions for shell commands while allowing authorized reads. Skill allowed-tools lists may grant preapproval rather than a deny-all boundary, so actual permission enforcement is needed.
Question 308
A documentation skill applies to multiple repositories. Which command or skill design meets the requirement?
- Declare a clear argument hint and validate that argument in the workflow
- Write deterministic steps and verifiable success criteria for the skill
- Package the repeatable invocation as a custom command or skill
- Store it in an appropriately shared skill scope rather than copying divergent versions
Explanation
Correct Answer
D:A single maintained source reduces inconsistent procedures across projects. For this situation, the system should store it in an appropriately shared skill scope rather than copying divergent versions. The factual trigger is a documentation skill applies to multiple repositories. Inspect the relevant code and callers before editing, so a local-looking change does not break another component.
Incorrect Answers
A:Explicit expected inputs reduce ambiguous execution and accidental broad file operations. The proposed option cannot provide the specific “Store it in an appropriately shared skill scope rather than copying divergent versions” behavior that the case requires. A single maintained source reduces inconsistent procedures across projects.
B:Specific requirements make repeated runs more consistent and easier to review. Here, a documentation skill applies to multiple repositories. Store it in an appropriately shared skill scope rather than copying divergent versions. A single maintained source reduces inconsistent procedures across projects.
C:Reusable workflow definitions reduce prompt drift and enforce a consistent invocation contract. The required action is “Store it in an appropriately shared skill scope rather than copying divergent versions”; the other measure addresses a separate concern. A single maintained source reduces inconsistent procedures across projects.
Question 309
A command needs the user to supply a required filename. How should the reusable skill or command be implemented?
- Declare a clear argument hint and validate that argument in the workflow
- Write deterministic steps and verifiable success criteria for the skill
- Package the repeatable invocation as a custom command or skill
- Use a SKILL.md with clear frontmatter and argument guidance
Explanation
Correct Answer
A:When a command needs the user to supply a required filename, the system should declare a clear argument hint and validate that argument in the workflow. Explicit expected inputs reduce ambiguous execution and accidental broad file operations. Keep the planned diff and tests scoped to the owning module and its actual dependencies.
Incorrect Answers
B:Specific requirements make repeated runs more consistent and easier to review. The proposed option cannot provide the specific “Declare a clear argument hint and validate that argument in the workflow” behavior that the case requires. Explicit expected inputs reduce ambiguous execution and accidental broad file operations.
C:Reusable workflow definitions reduce prompt drift and enforce a consistent invocation contract. The direct remedy is “Declare a clear argument hint and validate that argument in the workflow”, which the alternative does not itself accomplish. Explicit expected inputs reduce ambiguous execution and accidental broad file operations.
D:Skill metadata documents how to invoke the capability and what input it expects. Here, a command needs the user to supply a required filename. Declare a clear argument hint and validate that argument in the workflow. Explicit expected inputs reduce ambiguous execution and accidental broad file operations.
Question 310
A custom workflow changes behavior with every invocation because its instructions are vague. What should change in the skill configuration?
- Package the repeatable invocation as a custom command or skill
- Write deterministic steps and verifiable success criteria for the skill
- Use a SKILL.md with clear frontmatter and argument guidance
- Configure the skill or delegated context for a fork when supported
Explanation
Correct Answer
B:A custom workflow changes behavior with every invocation because its instructions are vague. The relevant control is to write deterministic steps and verifiable success criteria for the skill. Specific requirements make repeated runs more consistent and easier to review. Inspect the relevant code and callers before editing, so a local-looking change does not break another component.
Incorrect Answers
A:Reusable workflow definitions reduce prompt drift and enforce a consistent invocation contract. This is not a substitute for “Write deterministic steps and verifiable success criteria for the skill”; that control is necessary in the stated circumstances. Specific requirements make repeated runs more consistent and easier to review.
C:Skill metadata documents how to invoke the capability and what input it expects. Here, a custom workflow changes behavior with every invocation because its instructions are vague. Write deterministic steps and verifiable success criteria for the skill. Specific requirements make repeated runs more consistent and easier to review.
D:Isolation preserves the main conversation and lets the task operate with scoped context. The direct remedy is “Write deterministic steps and verifiable success criteria for the skill”, which the alternative does not itself accomplish. Specific requirements make repeated runs more consistent and easier to review.