How to Install and Use AI Agent Skills? Complete Tutorial for Claude Code and Codex Skill Package Configuration, Custom SKILL.md, and Automated Workflows

The Agent Skills specification requires two core frontmatter fields, name and description, and limits them to 64 and 1,024 characters respectively (specification). Those shared rules do not make every platform setup interchangeable.

Symptom: A skill folder exists, but Claude Code or Codex does not use it.
Fastest fix: Put the skill in the directory recognized by that platform, check its SKILL.md against the current official rules, then test it with a task that clearly matches its description.

You should treat installation as complete only after the agent recognizes the skill and produces a result that follows its instructions. Claude Code and Codex have different discovery conventions and may change their supported behavior, so verify each setup independently.

This guide is for developers installing or invoking skills in Claude Code or Codex.
It also helps you package team instructions in a maintainable SKILL.md.
If you are automating repeatable development or build tasks, use the workflow checks before expanding beyond a small trial.

Choose the platform scope before installing

A skill is a packaged set of instructions that an agent can use for a suitable task. It commonly includes a SKILL.md file and may include supporting resources, such as scripts or reference material. The open specification describes a format, but you still need to check each platform’s documentation for its own directory, supported fields, and loading behavior.

Use the format as a starting point, not as proof that a package will work everywhere. Claude Code’s skills documentation explains its skill conventions. For Codex, check the current CLI documentation and OpenAI’s skill-building guidance. Recheck those pages when you configure a new environment; do not rely on a path copied from an old tutorial.

Claude Code setup: Follow the Claude-specific directory and frontmatter rules. A project skill commonly lives under .claude/skills/<skill-name>/SKILL.md; a user-level skill commonly lives under ~/.claude/skills/<skill-name>/SKILL.md. Confirm the applicable scope and current path in the official documentation before using either example.

Codex setup: Follow Codex’s discovery conventions instead. A project skill commonly uses .agents/skills/<skill-name>/SKILL.md, while a user-level location may use ~/.agents/skills/<skill-name>/SKILL.md. Confirm the active Codex documentation and environment before creating files there.

These examples are platform-specific conventions, not a promise that every installation discovers those locations. If you work in a repository with multiple agents, keep each platform’s configuration distinct unless its current documentation explicitly confirms a shared location.

Before installing a package, check the following:

  • Tool availability: Confirm that the intended Claude Code or Codex client is installed, starts successfully, and can access the project where the skill should apply.
  • Source and contents: Review who supplied the skill, what its scripts do, and whether its instructions match the task. Do not run an unfamiliar script simply because it is bundled with a skill.
  • Permission boundaries: Check whether instructions could read private files, access network resources, alter a repository, or invoke commands. Give the agent only the access needed for the task.
  • Directory and format: Confirm the location, file name, required frontmatter, and any platform-specific rules in the relevant official documentation.
  • Expected result: Decide what a successful test should produce before invoking the skill. A response that merely mentions the skill name is not proof that its steps were followed.

A skill is an instruction package, not a guarantee that every command or side effect is safe. Review scripts and permissions separately from the prose in SKILL.md.

Install and trigger a skill in Claude Code

How do you install and enable a skill in Claude Code?

Create a skill directory in the project or user scope supported by Claude Code, then add a SKILL.md file. For example, a project-level package might use:

.claude/
  skills/
    release-note-drafter/
      SKILL.md
      references/
        release-format.md

Treat this as an example, not a universal path. Use the official Claude Code documentation to confirm the directory for your environment and the accepted fields. The file should describe a specific task clearly enough that Claude Code can identify when it applies. If the package contains reference documents, say when to consult them rather than copying their full contents into the main instructions.

A minimal file could look like this:

---
name: release-note-drafter
description: Draft release notes from merged changes when the user asks for a release summary.
---

# Release note drafting

## Goal
Create a concise draft based on the changes supplied by the user.

## Steps
- Read the supplied change list and release format.
- Group related changes by user impact.
- Flag missing information instead of inventing it.

## Output
Return a draft and list any assumptions that need review.

This example demonstrates a task description, steps, and output expectations. Before relying on it, check the current Claude Code rules for frontmatter and any additional supported fields. Do not assume fields accepted by another platform are valid here.

To verify recognition, open the intended project context and request a task that fits the description, such as drafting notes from a supplied change list. Check the result against the stated output and confirm that the agent did not invent missing details. If the skill supports direct invocation under Claude Code’s current rules, test that invocation too; do not assume every skill is exposed as a command.

If the skill does not trigger, check the directory and scope first. Confirm that SKILL.md is named and placed correctly, that the frontmatter parses, and that the description matches the task wording. Then consult the current documentation for loading or session-refresh behavior. Avoid “fixing” a discovery problem by making the description so broad that it matches unrelated requests.

Install and trigger a skill in Codex

Which directory should you use for a Codex skill?

Use the Codex-specific directory convention documented for your active setup. A project package may use .agents/skills/<skill-name>/SKILL.md; a user-level package may use ~/.agents/skills/<skill-name>/SKILL.md. Confirm these locations against the current Codex CLI guidance before treating them as authoritative for a particular installation.

A project-level example:

.agents/
  skills/
    test-failure-triage/
      SKILL.md
      references/
        test-policy.md

Do not copy the Claude Code directory into a Codex project and assume it will be discovered. Even if the skill content follows the open format, discovery, invocation, and support for extra fields depend on the platform.

After placing the file, start Codex in the relevant project context and check whether the skill is available using the method described in its current documentation. Then give it a task that should match, such as summarizing a supplied test failure using the package’s stated format. If the current Codex interface offers explicit skill selection, test that route as well as a normal task request. Confirm that the output follows the skill’s steps; a generic answer is not a successful verification.

When Codex does not load or apply a skill, check the following in order:

  • Scope: Is the skill in a location visible to the current project or user context?
  • Package structure: Is the SKILL.md file inside the skill’s own directory, rather than one level above or below it?
  • Metadata: Do the required fields match the current specification, and does the directory name agree with the skill name where required?
  • Task match: Does the description clearly cover the test request without relying on unstated context?
  • Current support: Does the active Codex documentation confirm this discovery or invocation behavior?
  • Errors: Read the exact client message and correct the reported formatting or loading issue rather than guessing at a different path.

The OpenAI guide to building skills is useful for checking package design, but it does not remove the need to verify how the Codex client in your environment discovers and invokes a skill.

Write and validate a custom SKILL.md

A maintainable SKILL.md tells the agent what work to do, when the instructions apply, and how to return a result. The open format’s required name and description fields have explicit size limits: the name is limited to 64 characters and the description to 1,024 characters (format details). Keep the description concise and specific; use the body for the procedure.

Include these elements in the body:

  • Goal: State the task and the intended result. “Review a pull request” is broad; “identify test failures and group them by likely cause using the supplied log” is more actionable.
  • Use conditions: Explain when the instructions apply and when they do not. Mention required inputs so the agent does not act on an incomplete request.
  • Procedure: Give ordered, observable actions. Tell the agent what to inspect and what to do if evidence is missing.
  • Inputs and outputs: Name the expected material and define the response format or files to produce.
  • Limits: State what must not be changed, what requires approval, and what the agent should report instead of guessing.
  • Supporting files: Put longer policy or reference material in separate files, then tell the agent when to read them.

Do not put every possible workflow into one skill. A broad skill with vague triggers can be selected for tasks it was never designed to handle. If two workflows have different inputs, permissions, or outputs, split them and test the descriptions against both intended and unrelated requests.

For cross-platform use, keep the task instructions portable and put platform-specific installation notes outside the shared procedure where possible. The same text may still need adjustments if either platform has different metadata or loading rules. The OpenAI skill concepts guide also distinguishes skills from tools such as MCP integrations: use a skill to guide repeatable instructions, and use an appropriate tool integration when the workflow needs a capability the agent does not otherwise have.

How should you test a custom skill?

Use a narrow test request with known inputs and a result you can inspect. Then test a nearby request that should not activate the skill. This reveals both whether the skill can be found and whether its trigger description is too broad.

Evaluate the result against the skill’s own requirements: did it follow the stated sequence, use the supplied evidence, honor its limits, and produce the requested output? OpenAI’s skill evaluation guidance provides a framework for testing whether a skill behaves as intended. Apply that idea to your package: record the test input, expected behavior, observed output, and any change you made.

When revising the file, change one unclear instruction at a time and repeat the relevant test. If a skill fails only when it must access a file, command, or external service, separate that capability problem from the instruction problem. A clearer SKILL.md cannot grant permissions or create a tool that is unavailable.

Connect a verified skill to an automated workflow

Treat a skill as one part of a workflow, not as the whole automation system. A repeatable process still needs an explicit input, a controlled execution step, failure handling, and a way to check the result.

A practical sequence is:

  • Define the trigger: Specify the event or request that starts the workflow, such as a supplied change list or a test log.
  • Prepare the input: Collect the files or facts the skill needs. Reject missing or ambiguous inputs instead of letting the agent fill gaps with assumptions.
  • Assign the skill: Invoke the relevant skill for the task it covers. Keep unrelated tasks separate so the agent has a clear scope.
  • Handle failures: Decide what happens if a command fails, a file is unavailable, or the agent cannot verify a claim. Stop for review when the next action could change important data.
  • Validate the output: Check the result against a defined format and the original input. Keep a human review step where the workflow can publish, merge, deploy, or modify important resources.
  • Expand carefully: Run the workflow on a small set of representative tasks. Fix unclear instructions and failure paths before connecting more repositories or automating more consequential actions.

For example, a team could use a skill to summarize a provided test log, then route the summary to a human reviewer. The skill can specify how to group failures and what evidence to include; the surrounding workflow must still decide how logs are supplied, where results go, and what happens when the summary is incomplete.

Do not treat a successful text response as proof that a build passed. If the workflow needs a tool to run tests or access a repository, verify that tool and its permissions separately. For a broader distinction between instruction packages and callable capabilities, use the Skills and MCP concepts guidance referenced above.

Mac-specific execution is relevant only when the workflow actually needs macOS or iOS development or build tools. Before assigning that work to a remote environment, check the Xcode system requirements and confirm that the required toolchain fits the host operating system. A Windows or Linux runner cannot replace a macOS build step that depends on Xcode. A local Mac may be simpler when the work needs attached hardware or frequent interactive access.

Keep secrets out of skill instructions and test data unless the workflow explicitly requires them. Decide how credentials are supplied and removed in the execution environment; the skill file itself should not become a store for tokens.

Use this installation and validation checklist

  • [ ] Claude Code: Confirm the current official skill directory and scope for your setup.
  • [ ] Codex: Confirm its discovery directory independently; do not copy Claude Code paths by default.
  • [ ] Both platforms: Check that SKILL.md has the required metadata and a task-specific description.
  • [ ] Source review: Inspect bundled scripts, references, requested permissions, and any network or file access.
  • [ ] Recognition test: Run a request that should match, then check the output against the instructions.
  • [ ] Negative test: Try a nearby request that should not match and narrow the description if it activates too broadly.
  • [ ] Workflow test: Verify input handling, failure behavior, result checks, and any human approval step before expanding use.
  • [ ] Platform check: For macOS or iOS build tasks, confirm the actual Xcode and host requirements before choosing an execution environment.

If your current setup relies on hand-run commands, shared local machines, or a non-macOS runner, its limitations may include inconsistent access, constrained capacity, or an inability to run Xcode-dependent work. A remote Mac can be a better fit for temporary macOS or iOS build tasks, but it also introduces remote-access and environment-management considerations; it is not automatically the right choice for continuous heavy workloads or jobs that need physical devices. Macstripe provides cloud Mac rental and remote Mac compute services, so review the Macstripe service information and help center against your workflow before choosing that route.