shareful-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShareful Init
Shareful初始化
Set up a shareful.ai shares repository so you can start capturing and sharing coding solutions.
搭建shareful.ai共享仓库,让你能够开始记录并分享编码解决方案。
When to Use This Skill
何时使用该技能
Use this skill when the user:
- Wants to set up a shares repository for the first time
- Asks "how do I start sharing solutions" or "set up shareful"
- Wants to contribute fixes back to the community
- Needs a repo to store SHARE.md files
当用户有以下需求时,可使用本技能:
- 首次搭建共享仓库
- 询问“如何开始分享解决方案”或“搭建shareful”
- 想要向社区贡献修复方案
- 需要一个仓库来存储SHARE.md文件
What Init Creates
初始化会创建的内容
npx shareful-ai init [name]my-shares/
.gitignore
README.md
AGENTS.md
shares/
example-share/
SHARE.md- -- directory for all SHARE.md solution files
shares/ - -- documents the SHARE.md format for AI agents working in the repo
AGENTS.md - -- repo overview with quick start instructions
README.md - -- template share to get started
example-share/SHARE.md
The command also initializes a git repository with an initial commit and saves the repo path to .
~/.shareful/config.jsonnpx shareful-ai init [name]my-shares/
.gitignore
README.md
AGENTS.md
shares/
example-share/
SHARE.md- —— 用于存放所有SHARE.md解决方案文件的目录
shares/ - —— 记录供仓库中AI Agent使用的SHARE.md格式规范
AGENTS.md - —— 仓库概览及快速入门指南
README.md - —— 用于快速上手的模板共享文件
example-share/SHARE.md
该命令还会初始化一个git仓库并完成初始提交,同时将仓库路径保存到中。
~/.shareful/config.jsonSetup Workflow
搭建流程
IMPORTANT: You MUST complete all 3 steps. After pushing to GitHub, you MUST run -- without it the repo will never appear on shareful.ai.
npx shareful-ai register重要提示:你必须完成全部3个步骤。推送到GitHub后,必须运行——否则仓库将不会在shareful.ai上显示。
npx shareful-ai registerStep 1: Create the Repository
步骤1:创建仓库
bash
npx shareful-ai init my-sharesThe name must be alphanumeric with dots, hyphens, or underscores (max 128 characters). Defaults to if not provided. The command creates an initial git commit automatically.
sharesbash
npx shareful-ai init my-shares仓库名称只能包含字母、数字、点号、连字符和下划线(最多128个字符)。如果未提供名称,默认使用。该命令会自动完成初始git提交。
sharesStep 2: Push to GitHub
步骤2:推送到GitHub
bash
cd my-shares
gh repo create my-shares --source . --public --pushOr create the repository manually on GitHub and push:
bash
cd my-shares
git remote add origin git@github.com:username/my-shares.git
git push -u origin mainbash
cd my-shares
gh repo create my-shares --source . --public --push或者手动在GitHub上创建仓库后推送:
bash
cd my-shares
git remote add origin git@github.com:username/my-shares.git
git push -u origin mainStep 3: Register for Indexing
步骤3:注册以实现索引
Immediately after pushing, register the repo. This is required -- the repo will not be indexed and shares will not be discoverable without it:
bash
npx shareful-ai registerOptionally, create your first share with .
npx shareful-ai create推送完成后立即注册仓库。这是必填步骤——未注册的仓库不会被索引,共享内容也无法被发现:
bash
npx shareful-ai register你也可以选择使用创建你的第一个共享内容。
npx shareful-ai createName Validation Rules
名称验证规则
- Letters, numbers, dots, hyphens, and underscores only
- Max 128 characters
- Examples: ,
my-shares,company.solutionsteam_fixes
- 仅允许使用字母、数字、点号、连字符和下划线
- 最多128个字符
- 示例:,
my-shares,company.solutionsteam_fixes
Related Skills
相关技能
- for writing high-quality SHARE.md files
shareful-create - for finding existing solutions on shareful.ai
shareful-search
- :用于编写高质量的SHARE.md文件
shareful-create - :用于在shareful.ai上查找现有解决方案
shareful-search