Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

Claude Code Custom Commands and Skills: Automate Your Workflow

Claude Code skills package reusable instructions and resources; command files provide simpler slash commands, while CLI print mode and GitHub Actions handle non-interactive automation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For reusable Claude Code workflows, use a skill when you need structured instructions, optional supporting files, or the possibility of automatic selection. Use a custom command file for a lightweight, explicitly named slash command—especially if your project already uses that convention. For unattended scripts, use claude -p; for jobs triggered by GitHub events, configure Claude Code GitHub Actions. These are different layers of automation, not interchangeable features.

How Claude Code skills and custom commands differ

A skill is a directory built around a SKILL.md file. That file combines YAML frontmatter, which describes the skill and its behavior, with Markdown instructions Claude follows when the skill runs. A skill can also include supporting files. Its name, usually the directory name, becomes the slash-command name; its description helps Claude decide whether to load it for a task.

As an Amazon Associate I earn from qualifying purchases.

Skills can be invoked directly, such as /summarize-changes, or selected automatically when Claude judges the description relevant. Automatic selection is not a guarantee for every vaguely related request: the description and invocation settings shape whether Claude uses a skill. Anthropic’s skills reference describes the frontmatter and invocation controls, including disable-model-invocation, which can prevent automatic model invocation when predictable, user-directed use is important.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Mechanism Best fit How it starts What it can contain
Skill in .claude/skills/ or ~/.claude/skills/ Repeatable instructions, team workflows, or a workflow that needs supporting resources Slash command or eligible automatic selection SKILL.md plus supporting files
Custom command file in .claude/commands/ A lightweight, explicitly named slash-command convention User invokes the command Command file; less structure than a skill
claude -p Scripts and non-interactive runs CLI invocation A prompt and deliberately configured tool permissions
Claude Code GitHub Actions Repository automation tied to GitHub activity or a supplied prompt Configured GitHub workflow Workflow configuration, credentials or an eligible token/federation method, and repository permissions

Claude Code continues to support files in .claude/commands/, but skills provide frontmatter and a directory for resources. If a skill and a command file use the same name, the skill takes precedence. Choose based on scope, triggering, complexity, and where the workflow runs—not on an assumption that one mechanism is always best.

Where to put a skill and who can use it

  • Personal: Put a skill under ~/.claude/skills/<skill-name>/ to make it available as a user-level workflow.
  • Project: Put a shared skill under .claude/skills/<skill-name>/ and commit it so teammates can use it with the repository.
  • Organization or additional locations: Claude Code documents enterprise and additional-directory skill locations in its skills reference.

Discovery depends on context. A skill in a nested project directory may not appear when a session starts above that directory; Claude may discover it after entering the directory or after the user adds it. Monorepos, worktrees, trust, and Claude Code version can also affect what is visible. Check the current documentation and the version you have installed before relying on version-specific discovery behavior.

Review and trust shared project configuration as appropriate before using it. Claude Code distinguishes committed project settings in .claude/settings.json from personal project-level overrides in .claude/settings.local.json; the latter is normally kept out of commits. See Anthropic’s settings files and precedence reference for current scope and precedence details.

How to create a reusable skill

The following setup creates a personal skill. To share it with a repository instead, use .claude/skills/ as the parent directory and commit the skill after reviewing its contents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Create a directory named for the workflow: mkdir -p ~/.claude/skills/summarize-changes.
  2. Create ~/.claude/skills/summarize-changes/SKILL.md. Start the file with YAML frontmatter between --- markers. Give it a useful description that says what work it handles and when it applies; follow the frontmatter format in the official skills reference.
  3. Below the frontmatter, write the actual Markdown instructions: the inputs Claude should inspect, the output you expect, and any constraints that make the result useful. Add supporting files in the skill directory if the workflow needs them.
  4. Start or continue Claude Code in a context where the skill is discoverable, then invoke it as /summarize-changes. If you need the skill to run only when explicitly requested, configure invocation behavior using the documented frontmatter controls rather than relying on the description alone.

Keep instructions specific enough to produce a repeatable result without assuming Claude will invoke the skill for every loosely related task. For team use, review any shared files and settings before committing them.

How to create a custom slash command

For a simple named command, create a Markdown command file in .claude/commands/ and invoke it by its filename as a slash command. This remains a supported convention, but it is the lighter-weight choice: skills add frontmatter, automatic-selection behavior, and a directory for related resources. If you want those capabilities, create a skill instead. Avoid giving a command file the same name as a skill, because the skill takes precedence.

How to automate Claude Code in scripts and CI

Run a non-interactive CLI prompt

Use claude -p "..." when a script needs to send a prompt without opening an interactive session. Anthropic’s CLI reference identifies print mode as useful for scripting and automation. Configure tool access deliberately—for example, with CLI options such as --allowedTools—so the run has only the permissions the job is expected to need. A skill or slash command by itself does not configure a non-interactive job or its permissions.

Run from a GitHub event or supplied prompt

For GitHub-triggered automation, use Claude Code GitHub Actions. The documented integration supports mention-triggered operation and prompt-supplied automation. Setup requires a workflow configuration, a suitable credential method (or eligible token/federation method), and appropriate repository permissions. Follow the current official setup and security guidance for the credential and permissions model you choose; a slash command alone does not install or authorize a GitHub integration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the workflow that matches the job

  • Use a personal skill when you want a reusable workflow for your own sessions.
  • Use a project skill when a team should share structured instructions and supporting assets in a repository.
  • Use a command file when a small, explicitly invoked slash command is enough and the project uses that simple convention.
  • Use claude -p for non-interactive terminal scripts, with tool permissions set for the job.
  • Use GitHub Actions when execution should be tied to GitHub activity or a configured prompt-driven workflow.

Claude Code’s documentation changes frequently. The official references for skills, CLI usage, GitHub Actions, and settings were checked on October 3, 2026; verify the guidance against your installed version and current documentation before relying on version-specific behavior.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.