Step‑by‑Step Guide to Install Claude Code and Build Custom AI Skills

This tutorial walks you through installing Claude Code on macOS, Linux, and Windows, configuring its environment, creating and managing Skills—including their directory layout, SKILL.md structure, progressive‑disclosure loading, and a real‑world pre‑sales proposal Skill—then running the Skill via the CLI with sample output.

Architect's Alchemy Furnace
Architect's Alchemy Furnace
Architect's Alchemy Furnace
Step‑by‑Step Guide to Install Claude Code and Build Custom AI Skills

1. Installing Claude Code

Claude Code is an AI‑powered coding assistant that runs in a terminal, IDE, or GitHub. Install it with one of the following commands:

macOS/Linux (recommended) : curl -fsSL https://claude.ai/install.sh | bash Homebrew (macOS/Linux) : brew install --cask claude-code Windows (recommended) : irm https://claude.ai/install.ps1 | iex WinGet (Windows) : winget install Anthropic.ClaudeCode NPM (deprecated) : npm install -g @anthropic-ai/claude-code After installation, run claude in your project directory. On Windows you may need to add the executable directory (e.g., C:\Users\HP\.local\bin) to the PATH environment variable.

2. Configuring the Large‑Model Backend

To use Claude’s models, install Antigravity Tools version 4.0.10 (download from

https://github.com/lbjlaq/Antigravity-Manager/releases/tag/v4.0.10

) and place the following JSON in ~/.claude/config.json (or C:\Users\HP\.claude\config.json on Windows):

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk-f2e1c87e0c50465c95feeabddbe7538b",
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:8045",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5",
    "ANTHROPIC_MODEL": "claude-opus-4-5-20251101",
    "ANTHROPIC_REASONING_MODEL": "claude-sonnet-4-5"
  },
  "includeCoAuthoredBy": false,
  "enabledPlugins": { "webapp-testing@awesome-claude-skills": true },
  "model": "opus"
}

Setting includeCoAuthoredBy = false skips the login step.

3. Skills – Modular Extensions for Claude

A Skill is a folder that extends Claude’s capabilities. After a fresh install the /skills command shows no skills. Community and official Skills can be downloaded from the Anthropic Marketplace or GitHub (e.g., https://github.com/anthropics/skills/tree/main/skills) and placed under ~/.claude/skills (or C:\Users\HP\.claude\skills on Windows).

3.1 Directory layout

skill-name/
├── SKILL.md          # required, contains metadata and workflow
├── scripts/          # optional executable scripts (Python, Bash, …)
├── references/       # optional docs loaded on demand
└── assets/           # optional output assets (templates, images, fonts)

3.2 SKILL.md – the Skill’s soul

SKILL.md consists of two parts:

YAML front‑matter (metadata). Example:

---
name: deep-research
description: Generate structured research reports, auto‑outline, multi‑source integration.
---

The description field is the sole trigger for Claude; a clear description ensures correct activation.

3.3 Markdown body – command logic

The body defines the workflow, for example:

# Deep Research Skill
## 工作流程
1. 确认研究主题和范围
2. 生成研究大纲
3. 分章节收集资料
4. 整合撰写报告
5. 生成参考文献
## 输出格式
使用 scripts/generate_report.py 生成最终 PDF…

3.4 Progressive disclosure design

Skills load in three layers to conserve Claude’s context window:

┌─────────────────────────────────
│  第 1 层:元信息(始终在上下文中)│ name + description (~100 words)
├────────────────────────────────────
│  第 2 层:SKILL.md 正文(触发后加载)│ ≤ 500 行
├─────────────────────────────────────
│  第 3 层:bundled resources(按需加载)│ scripts/、references/、assets/(无上限)
└────────────────────────────────────────┘

This prevents token waste and keeps the most relevant information visible.

4. Building a Real‑World Pre‑Sales Proposal Skill

4.1 Business planning

The Skill generates pre‑sales proposals and therefore needs a knowledge base containing market information, technical specifications, case studies, system architecture diagrams, etc.

Market pre‑sales

Selection guidance

Site survey guidance

Business quotation

Tendering

Installation & debugging

Customer case studies

System functions

R&D team information

Construction plan

4.2 Skill architecture

Directory layout (excerpt):

assets/
├── logo.png
├── template.docx
├── fonts/
└── 技术架构.png
references/
├── INDEX.md   # index of all docs with description, scenario, and path
└── xxx档案库   # actual documents
SKILL.md          # workflow definition

INDEX.md lists each file with a brief description, applicable scenario, and path, enabling the Skill to load only the needed resources.

4.3 SKILL.md definition

---
name: dcim-proposal-architect
description: 当用户要求生成数据中心售前方案、解决方案或标书时触发此技能。
metadata:
  author: wengl
  version: "1.0"
---
# 数据中心售前方案生成专家(dcim-proposal-architect)
## 角色定义 (Role)
你是一名拥有10年经验的资深数据中心售前架构师,能够结合公司文档输出逻辑严密、说服力强的中文方案。
## 策略 (Strategy)
遵循 **"Index‑First"** 策略,仅在需要时读取文件全文。
## 功能
- 读取技术要求文件(./references/技术要求)
- 根据模板(./assets/动环监控系统技术方案格式模板.docx)生成结构化文档
- 支持 Markdown/Word/PDF 输出
## 触发条件 (Triggers)
- 用户说 “帮我写个方案” 或 “生成售前文档”
- 用户上传需求文档并要求中文回复
## 工作流 (Process)
1. **分析需求 & 查阅索引**:读取 ./references/INDEX.md,决定相关文件。
2. **精准读取**:仅读取选中的 docx/pdf/xlsx 文件的全文。
3. **内容构建**:使用模板生成 Word,嵌入 ./assets 中的图片、图表。
4. **特殊处理**:英文资料自动翻译,专有名词保留英文。
## 约束 (Constraints)
- 禁止一次性读取全部 ./references 文件。
- 必须基于具体文件引用提供证据。
## 输出格式 (Output)
- 生成图文并茂的 Word 文件(如 售前方案_客户名称_日期.docx),返回文件链接。

4.4 Running the Skill

Execute the Skill from the Claude CLI:

/dcim-proposal-architect 根据 C:\Users\HP\.claude\skills\dcim-proposal-architect\references\技术要求 中的技术要求生成对应的售前方案

The Skill automatically loads auxiliary Skills for PDF, DOCX, and XLSX handling, reads the indexed files, assembles the proposal, and outputs a Word document. Sample output excerpt:

● P好的,我来按照工作流程为您生成售前方案。首先读取索引文件和技术要求。
● Reading 1 file…
● Skill(pdf) … successfully loaded
● 第一步:分析需求与查阅索引
● 根据用户需求,我需要读取以下相关文件:
   1. 动环监控系统功能模块描述.docx
   2. 施工方案.docx
   3. 研发团队人员介绍.docx
● 第二步:精准读取相关文件 …
● 第三步:生成 Word 文档并嵌入图片
● B✅ 售前方案已生成完成! 文档路径: C:\Users\wengl\.claude\skills\dcim-proposal-architect\数据中心平台技术方案_2025.docx

5. Key Takeaways

Install Claude Code via curl, Homebrew, PowerShell, WinGet, or npm.

Configure the large‑model backend with Antigravity Tools and a JSON token file.

Skills are modular folders; the essential file is SKILL.md, which contains a YAML front‑matter (trigger) and a markdown body (workflow).

Progressive disclosure (metadata → SKILL.md body → bundled resources) conserves Claude’s context window.

When building a Skill, define clear triggers, a concise description, and an index‑first strategy to load only needed documents.

Running a Skill via the CLI demonstrates automatic loading of auxiliary Skills (pdf, docx, xlsx) and produces the final artifact.

CLIAIAutomationSkillsPromptClaude Code
Architect's Alchemy Furnace
Written by

Architect's Alchemy Furnace

A comprehensive platform that combines Java development and architecture design, guaranteeing 100% original content. We explore the essence and philosophy of architecture and provide professional technical articles for aspiring architects.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.