10x-cli-guide

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

10x-cli Daily Usage Guide

10x-cli日常使用指南

This skill helps users work with
@przeprogramowani/10x-cli
after it is already installed and authenticated. If the user has not installed or authenticated yet, hand off to the 10x-cli-setup skill instead.
本技能帮助用户在已安装并完成认证后使用
@przeprogramowani/10x-cli
。如果用户尚未安装或完成认证,请转至10x-cli-setup技能。

Step 1: Detect the user's environment

步骤1:检测用户环境

Before giving any guidance, gather context silently — run these checks and remember the results. Do not print raw output to the user.
在提供任何指导之前,先静默收集上下文信息——运行以下检查并记录结果。不要向用户打印原始输出。

Operating system

操作系统

bash
echo "$OSTYPE" 2>/dev/null || echo "win32"
Use the result to tailor path separators, shell syntax, and clipboard commands throughout your answers:
OSShellHome varClipboardTemp dir
macOS (
darwin*
)
zsh / bash
$HOME
pbcopy
$TMPDIR
Linux (
linux-gnu*
)
bash / zsh
$HOME
xclip -selection clipboard
or
xsel --clipboard
/tmp
Windows (
win32
/ MSYS / Git Bash)
PowerShell / cmd
%USERPROFILE%
clip.exe
%TEMP%
bash
echo "$OSTYPE" 2>/dev/null || echo "win32"
根据结果调整回答中的路径分隔符、Shell语法和剪贴板命令:
操作系统Shell环境主目录变量剪贴板命令临时目录
macOS (
darwin*
)
zsh / bash
$HOME
pbcopy
$TMPDIR
Linux (
linux-gnu*
)
bash / zsh
$HOME
xclip -selection clipboard
xsel --clipboard
/tmp
Windows (
win32
/ MSYS / Git Bash)
PowerShell / cmd
%USERPROFILE%
clip.exe
%TEMP%

Active AI tool

当前激活的AI工具

bash
10x doctor --json 2>/dev/null | head -1
Also check which tool profile is configured:
bash
cat ~/.config/10x-cli/config.json 2>/dev/null || cat "$APPDATA/10x-cli/config.json" 2>/dev/null || echo "{}"
If the config contains a
"tool"
key, that is the active profile. If not, the default is
claude-code
.
bash
10x doctor --json 2>/dev/null | head -1
同时检查已配置的工具配置文件:
bash
cat ~/.config/10x-cli/config.json 2>/dev/null || cat "$APPDATA/10x-cli/config.json" 2>/dev/null || echo "{}"
如果配置文件包含
"tool"
键,即为当前激活的配置文件。如果没有,默认是
claude-code

CLI version

CLI版本

bash
10x --version
bash
10x --version

Step 2: Answer the user's question using the reference below

步骤2:参考以下内容回答用户问题

Use the environment context from Step 1 to personalize every answer. Always use the OS-appropriate shell syntax, paths, and commands. Never show macOS-specific commands to a Windows user or vice versa.

使用步骤1获取的环境上下文来个性化每个回答。始终使用适合对应操作系统的Shell语法、路径和命令。切勿向Windows用户展示macOS专属命令,反之亦然。

Command Reference

命令参考

10x get <ref>
— Fetch and apply lesson artifacts

10x get <ref>
— 获取并应用课程工件

The primary daily command. Fetches a lesson bundle from the API and writes skills, prompts, rules, and config templates to the project directory.
bash
10x get m1l1              # Fetch module 1, lesson 1
10x get m2l3              # Fetch module 2, lesson 3
10x get m1l1 --dry-run    # Preview what would be written
10x get m1l1 --tool cursor  # Use a different AI tool profile
10x get m1l1 --lang pl    # Fetch Polish content
Filtering artifacts:
bash
10x get m1l1 --type skills                     # Only skills
10x get m1l1 --type skills --name code-review  # One specific skill
10x get m1l1 --print --type skills --name code-review  # Print to stdout
Where artifacts land (depends on the active tool profile):
ToolSkillsPromptsRules fileConfig templates
Claude Code
.claude/skills/<name>/SKILL.md
.claude/prompts/<name>.md
CLAUDE.md
.claude/config-templates/<name>
Cursor
.cursor/skills/<name>/SKILL.md
.cursor/prompts/<name>.md
.cursor/rules/10x-course.mdc
.cursor/config-templates/<name>
GitHub Copilot
.github/skills/<name>/SKILL.md
.github/prompts/<name>.md
.github/copilot-instructions.md
.github/config-templates/<name>
Codex CLI
.agents/skills/<name>/SKILL.md
.agents/prompts/<name>.md
AGENTS.md
.agents/config-templates/<name>
Generic
.ai/skills/<name>/SKILL.md
.ai/prompts/<name>.md
AGENTS.md
.ai/config-templates/<name>
Re-applying a lesson overwrites skills and prompts if content changed, updates the rules sentinel block, but never overwrites config templates (they may contain user edits).
Switching lessons cleans up artifacts from the previous lesson that are not in the new one, keeps shared artifacts, and adds new ones.
日常使用的核心命令。从API获取课程包,并将技能、提示词、规则和配置模板写入项目目录。
bash
10x get m1l1              # 获取模块1,课程1
10x get m2l3              # 获取模块2,课程3
10x get m1l1 --dry-run    # 预览将要写入的内容
10x get m1l1 --tool cursor  # 使用其他AI工具配置文件
10x get m1l1 --lang pl    # 获取波兰语内容
过滤工件:
bash
10x get m1l1 --type skills                     # 仅获取技能
10x get m1l1 --type skills --name code-review  # 获取指定的单个技能
10x get m1l1 --print --type skills --name code-review  # 打印到标准输出
工件存放位置(取决于当前激活的工具配置文件):
工具技能提示词规则文件配置模板
Claude Code
.claude/skills/<name>/SKILL.md
.claude/prompts/<name>.md
CLAUDE.md
.claude/config-templates/<name>
Cursor
.cursor/skills/<name>/SKILL.md
.cursor/prompts/<name>.md
.cursor/rules/10x-course.mdc
.cursor/config-templates/<name>
GitHub Copilot
.github/skills/<name>/SKILL.md
.github/prompts/<name>.md
.github/copilot-instructions.md
.github/config-templates/<name>
Codex CLI
.agents/skills/<name>/SKILL.md
.agents/prompts/<name>.md
AGENTS.md
.agents/config-templates/<name>
Generic
.ai/skills/<name>/SKILL.md
.ai/prompts/<name>.md
AGENTS.md
.ai/config-templates/<name>
重新应用课程会覆盖已更新的技能和提示词,更新规则标记块,但绝不会覆盖配置模板(它们可能包含用户编辑内容)。
切换课程会清理上一课程中不存在于新课程的工件,保留共享工件,并添加新工件。

10x list [module]
— Browse available content

10x list [module]
— 浏览可用内容

bash
10x list       # Show all modules with lock state
10x list m1    # Show lessons in module 1
Locked modules show their unlock date. Use this to see what is available before fetching.
bash
10x list       # 显示所有模块及其锁定状态
10x list m1    # 显示模块1中的课程
锁定的模块会显示解锁日期。在获取内容前可使用此命令查看可用内容。

10x doctor
— Diagnose problems

10x doctor
— 诊断问题

Runs 5 checks: Auth status, API connectivity, Config directory, CLI version, and tool directory presence.
bash
10x doctor          # Human-readable output
10x doctor --json   # Machine-readable for scripting
Exit code 78 means at least one check failed.
运行5项检查:认证状态、API连通性、配置目录、CLI版本和工具目录是否存在。
bash
10x doctor          # 人类可读格式输出
10x doctor --json   # 机器可读格式,适用于脚本
退出码78表示至少有一项检查未通过。

10x auth
— Session management

10x auth
— 会话管理

bash
10x auth             # Start magic-link login
10x auth --status    # Check current session
10x auth --logout    # Clear credentials
Sessions refresh transparently — if a token is near expiry, the next command refreshes it automatically. You only need to re-auth manually if the session has fully expired.

bash
10x auth             # 启动魔法链接登录
10x auth --status    # 检查当前会话状态
10x auth --logout    # 清除凭证
会话会自动刷新——如果令牌即将过期,下一次命令会自动刷新它。仅当会话完全过期时才需要手动重新认证。

Switching Tools

切换工具

To change your AI tool (e.g., from Claude Code to Cursor):
bash
10x get m1l1 --tool cursor
The CLI will detect that artifacts from the old tool exist and offer two options:
  1. Migrate (default) — move all artifacts to the new tool's directories, remove the sentinel block from the old rules file.
  2. Delete — remove only 10x-managed artifacts from the old tool's directories. Your own files (e.g.,
    .github/workflows/
    ) are never touched.
The tool choice is saved in the config file (
~/.config/10x-cli/config.json
on macOS/Linux,
%APPDATA%/10x-cli/config.json
on Windows). Future
get
commands will use the new tool without needing
--tool
again.

要更改AI工具(例如从Claude Code切换到Cursor):
bash
10x get m1l1 --tool cursor
CLI会检测到旧工具的工件已存在,并提供两个选项:
  1. 迁移(默认)——将所有工件移动到新工具的目录,从旧规则文件中移除标记块。
  2. 删除——仅删除旧工具目录中由10x管理的工件。用户自己的文件(例如
    .github/workflows/
    )绝不会被触碰。
工具选择会保存到配置文件中(macOS/Linux为
~/.config/10x-cli/config.json
,Windows为
%APPDATA%/10x-cli/config.json
)。后续的
get
命令会自动使用新工具,无需再添加
--tool
参数。

Platform-Specific Tips

平台特定技巧

Windows

Windows

  • Use PowerShell (not cmd.exe). The CLI outputs ANSI colors and Unicode symbols that render correctly in Windows Terminal + PowerShell but may garble in legacy cmd.
  • npx works fine:
    npx @przeprogramowani/10x-cli get m1l1
    — no global install needed. Node 20+ is the only prerequisite.
  • Clipboard: Skills that copy to clipboard use
    clip.exe
    on Windows. If a skill outputs a clipboard command, it will fall back silently if
    clip.exe
    is unavailable.
  • Config location:
    %APPDATA%\10x-cli\config.json
    and
    %APPDATA%\10x-cli\auth.json
    . The CLI creates these automatically.
  • Path separators: The CLI uses Node's
    path.join()
    internally, so forward slashes in command output (like
    .claude/skills/code-review/SKILL.md
    ) work fine on Windows — no need to convert them.
  • 使用PowerShell(而非cmd.exe)。CLI输出的ANSI颜色和Unicode符号在Windows Terminal + PowerShell中能正确显示,但在旧版cmd中可能出现乱码。
  • npx可以正常使用
    npx @przeprogramowani/10x-cli get m1l1
    ——无需全局安装。仅需预先安装Node 20+版本。
  • 剪贴板:涉及复制到剪贴板的技能在Windows上使用
    clip.exe
    。如果某个技能输出剪贴板命令,若
    clip.exe
    不可用会自动静默降级。
  • 配置文件位置
    %APPDATA%\10x-cli\config.json
    %APPDATA%\10x-cli\auth.json
    。CLI会自动创建这些文件。
  • 路径分隔符:CLI内部使用Node的
    path.join()
    ,因此命令输出中的正斜杠(如
    .claude/skills/code-review/SKILL.md
    )在Windows上可正常工作——无需转换。

Linux

Linux

  • Clipboard: Skills use
    xclip -selection clipboard
    or
    xsel --clipboard
    . If neither is installed, clipboard operations fail silently. Install with
    sudo apt install xclip
    (Debian/Ubuntu) or
    sudo dnf install xclip
    (Fedora).
  • Config location:
    ~/.config/10x-cli/
    (respects
    $XDG_CONFIG_HOME
    if set).
  • 剪贴板:技能使用
    xclip -selection clipboard
    xsel --clipboard
    。如果两者均未安装,剪贴板操作会静默失败。可通过
    sudo apt install xclip
    (Debian/Ubuntu)或
    sudo dnf install xclip
    (Fedora)安装。
  • 配置文件位置
    ~/.config/10x-cli/
    (如果设置了
    $XDG_CONFIG_HOME
    则遵循该路径)。

macOS

macOS

  • Clipboard: Skills use
    pbcopy
    — works out of the box.
  • Config location:
    ~/.config/10x-cli/
    .

  • 剪贴板:技能使用
    pbcopy
    ——开箱即用。
  • 配置文件位置
    ~/.config/10x-cli/

Troubleshooting

问题排查

When the user reports a problem, follow this sequence:
当用户报告问题时,请按照以下步骤操作:

1. Run doctor first

1. 先运行doctor命令

bash
10x doctor
This catches the most common issues. Read the output and address each failing check.
bash
10x doctor
这可以排查大多数常见问题。读取输出并解决每一项未通过的检查。

2. Common problems and fixes

2. 常见问题及解决方法

SymptomLikely causeFix
"You're not signed in"No auth or expired session
10x auth
"Session expired"Token past expiry and auto-refresh failed
10x auth
(re-login)
API unreachable / timeoutNetwork issue or API outageCheck internet; retry in a few minutes
"Module is locked"Content not yet released
10x list
to see unlock date
.claude/
not found (doctor fail)
Running from wrong directory or wrong tool profile
cd
to project root; check
10x doctor --json
for which tool is configured
"403 Forbidden" on
10x get
Module locked or no membershipCheck
10x list
for module state; verify enrollment
Orphaned artifact prompt on
get
Switching tools mid-lessonChoose "migrate" to move files, or "delete" to clean up
Permission denied writing filesDirectory not writableCheck directory permissions; on POSIX:
chmod u+w <dir>
症状可能原因解决方法
"您尚未登录"未认证或会话过期
10x auth
"会话已过期"令牌过期且自动刷新失败
10x auth
(重新登录)
API无法访问/超时网络问题或API故障检查网络连接;几分钟后重试
"模块已锁定"内容尚未发布
10x list
查看解锁日期
找不到
.claude/
(doctor检查失败)
在错误的目录运行命令或工具配置文件错误
cd
到项目根目录;查看
10x doctor --json
确认已配置的工具
10x get
时出现"403 Forbidden"
模块已锁定或无会员权限查看
10x list
的模块状态;验证注册情况
get
时出现孤立工件提示
在课程中途切换工具选择“迁移”移动文件,或“删除”清理旧工件
写入文件时权限被拒绝目录不可写检查目录权限;在POSIX系统上:
chmod u+w <dir>

3. Verbose mode for deeper debugging

3. 详细调试的 verbose 模式

bash
10x get m1l1 --verbose
10x doctor --verbose
This prints request/response diagnostics to stderr, useful for diagnosing API or network issues.
bash
10x get m1l1 --verbose
10x doctor --verbose
这会将请求/响应诊断信息打印到标准错误输出,有助于排查API或网络问题。

4. Nuclear reset

4. 彻底重置

If config is corrupted:
On macOS/Linux:
bash
rm -rf ~/.config/10x-cli
10x auth
On Windows (PowerShell):
powershell
Remove-Item -Recurse -Force "$env:APPDATA\10x-cli"
10x auth
This clears auth and tool preference. The next
10x auth
recreates everything.

如果配置文件损坏:
在macOS/Linux上:
bash
rm -rf ~/.config/10x-cli
10x auth
在Windows(PowerShell)上:
powershell
Remove-Item -Recurse -Force "$env:APPDATA\10x-cli"
10x auth
这会清除认证信息和工具偏好。下一次运行
10x auth
会重新创建所有配置。

Important Principles

重要原则

  • Answer with the user's OS and tool in mind. Never show
    pbcopy
    to a Windows user. Never show
    %APPDATA%
    to a macOS user.
  • Run
    10x doctor
    before speculating.
    It catches 80% of issues.
  • Don't guess command syntax from memory. If unsure about a flag or behavior, fetch the latest README:
    https://raw.githubusercontent.com/przeprogramowani/10x-cli/refs/heads/master/README.md
  • Distinguish tool profile issues from CLI issues. If artifacts land in the wrong directory, it is a tool profile question. If the command itself fails, it is a CLI/auth/network question.
  • 结合用户的操作系统和工具提供回答。切勿向Windows用户展示
    pbcopy
    ,也不要向macOS用户展示
    %APPDATA%
  • 在猜测问题前先运行
    10x doctor
    。它能排查80%的问题。
  • 不要凭记忆猜测命令语法。如果不确定某个参数或行为,请获取最新的README:
    https://raw.githubusercontent.com/przeprogramowani/10x-cli/refs/heads/master/README.md
  • 区分工具配置文件问题和CLI问题。如果工件存放在错误目录,属于工具配置文件问题。如果命令本身执行失败,属于CLI/认证/网络问题。