用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill docs-as-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Token-efficient tracking for AI orchestration. CLI-first for status updates (~50 tokens), agent fallback for complex ops (~1KB). Use when: updating task status, querying blockers, creating progress files, validating phases.
AshAi extension guidelines for integrating AI capabilities with Ash Framework. Use when implementing vectorization/embeddings, exposing Ash actions as LLM tools, creating prompt-backed actions, or setting up MCP servers. Covers semantic search, LangChain integration, and structured outputs.
This skill should be used when solving hard questions, complex architectural problems, or debugging issues that benefit from GPT-5 Pro or GPT-5.1 thinking models with large file context. Use when standard Claude analysis needs deeper reasoning or extended context windows.
基于 SOC 职业分类
正在显示 SKILL.md
| name | docs-as-code |
| description | Documentation pipeline automation and docs-as-code workflows |
| allowed-tools | Read, Glob, Grep, Write, Edit, Bash |
Use this skill when:
Implement documentation-as-code workflows with automated pipelines, version control, and CI/CD integration.
Before implementing docs-as-code:
docs-management skill for documentation patternsDocs-as-Code Principles:
┌─────────────────────────────────────────────────────────────────────────────┐
│ 1. Version Control │
│ - Docs live alongside code in the same repository │
│ - Changes tracked with meaningful commit messages │
│ - Branch-based workflow for documentation updates │
├─────────────────────────────────────────────────────────────────────────────┤
│ 2. Review Process │
│ - Pull requests for documentation changes │
│ - Technical review by subject matter experts │
│ - Style review by technical writers │
├─────────────────────────────────────────────────────────────────────────────┤
│ 3. Automated Testing │
│ - Linting for style and grammar │
│ - Link validation │
│ - Build verification │
├─────────────────────────────────────────────────────────────────────────────┤
│ 4. Continuous Deployment │
│ - Automatic publishing on merge │
│ - Preview deployments for PRs │
│ - Versioned documentation releases │
└─────────────────────────────────────────────────────────────────────────────┘
| Tool | Language | Best For | Build Speed |
|---|---|---|---|
| Docusaurus | JS/React | Product docs, versioning | Fast |
| MkDocs | Python | Technical docs, Material theme | Fast |
| Sphinx | Python | API docs, reStructuredText | Medium |
| Hugo | Go | Large sites, speed | Very Fast |
| Astro | JS | Modern sites, MDX | Fast |
| VitePress | JS/Vue | Vue ecosystem | Very Fast |
| Jekyll | Ruby | GitHub Pages native | Medium |
docs/
├── docusaurus.config.js # Main configuration
├── sidebars.js # Navigation structure
├── package.json # Dependencies
├── docs/ # Documentation content
│ ├── intro.md
│ ├── getting-started/
│ │ ├── installation.md
│ │ └── configuration.md
│ ├── guides/
│ │ ├── quick-start.md
│ │ └── advanced.md
│ └── api/
│ └── reference.md
├── blog/ # Blog posts (optional)
├── src/
│ ├── components/ # React components
│ ├── css/ # Custom styles
│ └── pages/ # Custom pages
├── static/ # Static assets
│ └── img/
└── versioned_docs/ # Version snapshots
├── version-1.0/
└── version-2.0/
docs/
├── mkdocs.yml # Configuration
├── docs/
│ ├── index.md
│ ├── getting-started/
│ │ ├── installation.md
│ │ └── configuration.md
│ ├── user-guide/
│ │ └── features.md
│ ├── reference/
│ │ └── api.md
│ └── about/
│ └── changelog.md
├── overrides/ # Theme customization
│ ├── main.html
│ └── partials/
└── requirements.txt # Python dependencies
// docusaurus.config.js
const config = {
title: 'Project Name',
tagline: 'Project tagline',
url: 'https://docs.example.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'organization',
projectName: 'project',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/org/project/edit/main/docs/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
versions: {
current: {
label: 'Next',
path: 'next',
},
},
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/org/project/edit/main/docs/',
},
: {
: .(),
},
},
],
],
: {
: {
: ,
: {
: ,
: ,
},
: [
{ : , : , : , : },
{ : , : , : },
{ : , : },
{ : , : , : },
],
},
: {
: ,
: [
{
: ,
: [{ : , : }],
},
{
: ,
: [{ : , : }],
},
],
: ,
},
: {
: (),
: (),
: [, , ],
},
: {
: ,
: ,
: ,
},
},
};
. = config;
# mkdocs.yml
site_name: Project Documentation
site_url: https://docs.example.com
repo_url: https://github.com/org/project
repo_name: org/project
edit_uri: edit/main/docs/
theme:
name: material
palette:
- scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: indigo
accent: indigo
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.instant
- navigation.tracking
- navigation.tabs
- navigation.sections
# .github/workflows/docs.yml
name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'docs/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
working-directory: docs
run: npm ci
- name: Lint Markdown
run: npx markdownlint-cli2
# azure-pipelines.yml
trigger:
branches:
include:
- main
paths:
include:
- docs/**
pool:
vmImage: 'ubuntu-latest'
variables:
pythonVersion: '3.11'
stages:
- stage: Validate
jobs:
- job: Lint
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(pythonVersion)'
- script: |
pip install -r docs/requirements.txt
pip install markdownlint-cli2
displayName: 'Install dependencies'
- script: markdownlint-cli2 "docs/**/*.md"
displayName: 'Lint Markdown'
- stage: Build
dependsOn: Validate
jobs:
- job: Build
steps:
-
// .markdownlint.json
{
"default": true,
"MD001": true,
"MD003": { "style": "atx" },
"MD004": { "style": "dash" },
"MD007": { "indent": 2 },
"MD009": true,
"MD010": true,
"MD012": true,
"MD013": { "line_length": 120, "code_blocks":
# .vale.ini
StylesPath = styles
MinAlertLevel = suggestion
Packages = Microsoft, write-good, proselint
[*.md]
BasedOnStyles = Vale, Microsoft, write-good
# Ignore code blocks
BlockIgnores = (?s) *(`{3}.*?`{3})
# Custom rules
Microsoft.Contractions = NO
Microsoft.HeadingPunctuation = YES
write-good.Passive = YES
write-good.Weasel = YES
write-good.TooWordy = YES
// API Documentation Generation with XML Comments
/// <summary>
/// Manages user authentication and authorization.
/// </summary>
/// <remarks>
/// <para>
/// This service handles all authentication flows including:
/// <list type="bullet">
/// <item>Password-based authentication</item>
/// <item>OAuth 2.0 / OpenID Connect</item>
/// <item>API key authentication</item>
/// </list>
/// </para>
/// </remarks>
/// <example>
/// <code>
/// var result = await authService.AuthenticateAsync(credentials);
/// if (result.IsSuccess)
/// {
/// var token = result.Value.AccessToken;
/// }
{
Task<Result<AuthenticationResponse>> AuthenticateAsync(
AuthenticationCredentials credentials,
CancellationToken cancellationToken = );
}
// Program.cs - Swagger/OpenAPI configuration
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Project API",
Version = "v1",
Description = "API documentation for the Project",
Contact = new OpenApiContact
{
Name = "API Support",
Email = "api@example.com",
Url = new Uri("https://docs.example.com")
},
License = new OpenApiLicense
{
Name = "MIT",
Url = new Uri("https://opensource.org/licenses/MIT")
}
});
// Include XML comments
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
options.IncludeXmlComments(xmlPath);
// Security definitions
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "JWT Authorization header using the Bearer scheme.",
Name = "Authorization",
In = ParameterLocation.Header,
Type = SecuritySchemeType.Http,
Scheme = "bearer"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
}
},
Array.Empty<string>()
}
});
});
// check-links.mjs
import { remark } from 'remark';
import remarkLintNoDeadUrls from 'remark-lint-no-dead-urls';
import { read } from 'to-vfile';
import { glob } from 'glob';
import { reporter } from 'vfile-reporter';
const files = await glob('docs/**/*.md');
for (const file of files) {
const result = await remark()
.use(remarkLintNoDeadUrls, {
skipLocalhost: true,
skipOffline: true,
})
.process(await read(file));
console.error(reporter(result));
}
// docs.spec.ts - Playwright screenshot tests
import { test, expect } from '@playwright/test';
test.describe('Documentation Screenshots', () => {
test('homepage renders correctly', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveScreenshot('homepage.png');
});
test('API reference page', async ({ page }) => {
await page.goto('/docs/api/reference');
await expect(page.locator('.api-content')).toBeVisible();
await expect(page).toHaveScreenshot('api-reference.png');
});
test('dark mode toggle', async ({ page }) => {
await page.goto('/');
await page.click('[data-theme-toggle]');
await expect(page).toHaveScreenshot('homepage-dark.png');
});
});
| Practice | Description |
|---|---|
| Single Source of Truth | Each concept documented in one place |
| Progressive Disclosure | Start simple, link to details |
| Consistent Structure | Same sections across similar pages |
| Clear Navigation | Logical hierarchy, breadcrumbs |
| Search Optimization | Good headings, keywords, descriptions |
Documentation Versioning:
Option 1: Version Folders (Docusaurus/MkDocs mike)
├── docs/
│ ├── version-1.0/
│ ├── version-2.0/
│ └── current/
Option 2: Branch-based
├── main (current)
├── v1.x
└── v2.x
Option 3: Git Tags
├── v1.0.0
├── v2.0.0
└── latest
Recommendation: Use tool-native versioning (Docusaurus versioned_docs, mike for MkDocs)
When implementing docs-as-code:
For detailed guidance:
Last Updated: 2025-12-26