Skip to content

Commit 17aa977

Browse files
committed
docs: rewrite documentation and add docs-writing skill
1 parent a313544 commit 17aa977

14 files changed

Lines changed: 161 additions & 46 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ Docsmith is designed for package and project documentation where you want a fast
3131
composer require --dev mrpunyapal/docsmith
3232
```
3333

34-
Using AI agents (Claude Code, Cursor, Boost, ...)? Docsmith ships an installable skill:
34+
Using AI agents (Claude Code, Cursor, Boost, ...)? Docsmith ships installable skills:
3535

3636
```bash
3737
npx skills add MrPunyapal/docsmith/resources/boost/skills
3838
# or, in a Laravel project with Boost:
39-
php artisan boost:install # installs it automatically from composer.json
39+
php artisan boost:install # installs them automatically from composer.json
4040
```
4141

4242
## Quick Start

docs/export/docs.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,14 @@ MIT. See [LICENSE](https://github.com/MrPunyapal/docsmith/blob/main/LICENSE) for
409409
composer require --dev mrpunyapal/docsmith
410410
```
411411

412-
## Install the AI agent skill
412+
## Install the AI agent skills
413413

414-
Docsmith ships an [Agent Skills](https://agentskills.io) compatible skill called `docsmith-development`. It teaches coding agents such as Claude Code, Cursor, Codex, and OpenCode how to use the package: build options, frontmatter keys, versioned docs, docs hubs, and remote source syncing.
414+
Docsmith ships two [Agent Skills](https://agentskills.io) compatible skills:
415+
416+
- `docsmith-development`: teaches agents the package itself, build options, frontmatter keys, versioned docs, docs hubs, remote source syncing, and Open Graph images.
417+
- `docs-writing`: teaches agents how to write documentation pages that build cleanly and read well.
418+
419+
They work with coding agents such as Claude Code, Cursor, Codex, and OpenCode.
415420

416421
### Via Laravel Boost
417422

@@ -435,7 +440,7 @@ Any agent supported by the [skills CLI](https://skills.sh) can install it too:
435440
npx skills add MrPunyapal/docsmith/resources/boost/skills
436441
```
437442

438-
After installing, ask your agent to activate the `docsmith-development` skill when it works on documentation builds.
443+
After installing, ask your agent to activate the `docsmith-development` skill when it works on documentation builds, and `docs-writing` when it writes or edits documentation pages.
439444

440445
## Build documentation
441446

@@ -856,7 +861,7 @@ hidden: true
856861

857862
## LLM export
858863

859-
Docsmith generates three text files for LLM consumption: `llms.txt`, `llms-full.txt`, and `export/docs.md`. This is enabled by default; see [LLM Export](llm-export.md).
864+
Docsmith generates three text files for LLM consumption: `llms.txt`, `llms-full.txt`, and `export/docs.md`. This is enabled by default; see [LLM Export](llm-export.md) for details.
860865

861866
## Attribution badge
862867

@@ -894,6 +899,16 @@ If the source directory has no `index.md`, Docsmith generates a landing page aut
894899

895900
Every build also writes `search-index.json`, `sitemap.xml`, `.nojekyll`, and the LLM export files into the output directory.
896901

902+
## Linking between pages
903+
904+
Write internal links the GitHub way, pointing at the `.md` file:
905+
906+
```markdown
907+
See [Versioned Docs](versioned-docs.md) for details.
908+
```
909+
910+
Docsmith rewrites these to the built page URLs at build time. Relative paths (`../installation.md`) and fragments (`configuration.md#options`) both resolve, in plain builds as well as versioned and hub builds. Links to `.md` files that are not part of the build are left untouched, as are external URLs and anchors.
911+
897912
## README index compatibility mode
898913

899914
Docsmith can import README index formats used by projects like `laravel-undocumented` and `laravel-attributes-list`:

docs/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,16 @@ <h2 id="quick-start">Quick start</h2>
8585
<p>This reads Markdown from <code>md/</code> and writes the site to <code>docs/</code> by default, which works directly with GitHub Pages.</p>
8686
<h2 id="documentation">Documentation</h2>
8787
<ul>
88-
<li><a href="installation.md">Installation</a></li>
89-
<li><a href="usage.md">Usage</a></li>
90-
<li><a href="versioned-docs.md">Versioned Docs</a></li>
91-
<li><a href="docs-hub.md">Docs Hub</a></li>
92-
<li><a href="remote-sources.md">Remote Sources</a></li>
93-
<li><a href="workflows.md">Workflows</a></li>
94-
<li><a href="llm-export.md">LLM Export</a></li>
95-
<li><a href="open-graph.md">Open Graph Images</a></li>
96-
<li><a href="architecture.md">Architecture</a></li>
97-
<li><a href="development.md">Development</a></li>
88+
<li><a href="installation/">Installation</a></li>
89+
<li><a href="usage/">Usage</a></li>
90+
<li><a href="versioned-docs/">Versioned Docs</a></li>
91+
<li><a href="docs-hub/">Docs Hub</a></li>
92+
<li><a href="remote-sources/">Remote Sources</a></li>
93+
<li><a href="workflows/">Workflows</a></li>
94+
<li><a href="llm-export/">LLM Export</a></li>
95+
<li><a href="open-graph/">Open Graph Images</a></li>
96+
<li><a href="architecture/">Architecture</a></li>
97+
<li><a href="development/">Development</a></li>
9898
</ul>
9999
<h2 id="license">License</h2>
100100
<p>MIT. See <a href="https://github.com/MrPunyapal/docsmith/blob/main/LICENSE">LICENSE</a> for details.</p>

docs/installation/index.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ <h2 id="requirements">Requirements</h2>
5757
<h2 id="install-the-package">Install the package</h2>
5858
<pre class="phiki language-shellscript github-light phiki-themes github-dark" data-language="shellscript" style="background-color: #fff;color: #24292e;--phiki-dark-background-color: #24292e;--phiki-dark-color: #e1e4e8;"><code><span class="line"><span class="token" style="color: #6f42c1;--phiki-dark-color: #b392f0;">composer</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">require</span><span class="token"> </span><span class="token" style="color: #005cc5;--phiki-dark-color: #79b8ff;">-</span><span class="token" style="color: #005cc5;--phiki-dark-color: #79b8ff;">-dev</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">mrpunyapal/docsmith</span><span class="token">
5959
</span></span></code></pre>
60-
<h2 id="install-the-ai-agent-skill">Install the AI agent skill</h2>
61-
<p>Docsmith ships an <a href="https://agentskills.io">Agent Skills</a> compatible skill called <code>docsmith-development</code>. It teaches coding agents such as Claude Code, Cursor, Codex, and OpenCode how to use the package: build options, frontmatter keys, versioned docs, docs hubs, and remote source syncing.</p>
60+
<h2 id="install-the-ai-agent-skills">Install the AI agent skills</h2>
61+
<p>Docsmith ships two <a href="https://agentskills.io">Agent Skills</a> compatible skills:</p>
62+
<ul>
63+
<li><code>docsmith-development</code>: teaches agents the package itself, build options, frontmatter keys, versioned docs, docs hubs, remote source syncing, and Open Graph images.</li>
64+
<li><code>docs-writing</code>: teaches agents how to write documentation pages that build cleanly and read well.</li>
65+
</ul>
66+
<p>They work with coding agents such as Claude Code, Cursor, Codex, and OpenCode.</p>
6267
<h3 id="via-laravel-boost">Via Laravel Boost</h3>
6368
<p>If your Laravel project uses <a href="https://laravel.com/docs/boost">Boost</a>, the skill installs automatically because Docsmith is in your <code>composer.json</code>:</p>
6469
<pre class="phiki language-shellscript github-light phiki-themes github-dark" data-language="shellscript" style="background-color: #fff;color: #24292e;--phiki-dark-background-color: #24292e;--phiki-dark-color: #e1e4e8;"><code><span class="line"><span class="token" style="color: #6f42c1;--phiki-dark-color: #b392f0;">php</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">artisan</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">boost:install</span><span class="token">
@@ -70,7 +75,7 @@ <h3 id="via-the-skills-cli">Via the skills CLI</h3>
7075
<p>Any agent supported by the <a href="https://skills.sh">skills CLI</a> can install it too:</p>
7176
<pre class="phiki language-shellscript github-light phiki-themes github-dark" data-language="shellscript" style="background-color: #fff;color: #24292e;--phiki-dark-background-color: #24292e;--phiki-dark-color: #e1e4e8;"><code><span class="line"><span class="token" style="color: #6f42c1;--phiki-dark-color: #b392f0;">npx</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">skills</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">add</span><span class="token"> </span><span class="token" style="color: #032f62;--phiki-dark-color: #9ecbff;">MrPunyapal/docsmith/resources/boost/skills</span><span class="token">
7277
</span></span></code></pre>
73-
<p>After installing, ask your agent to activate the <code>docsmith-development</code> skill when it works on documentation builds.</p>
78+
<p>After installing, ask your agent to activate the <code>docsmith-development</code> skill when it works on documentation builds, and <code>docs-writing</code> when it writes or edits documentation pages.</p>
7479
<h2 id="build-documentation">Build documentation</h2>
7580
<p>Docsmith builds a static site from any Markdown directory, either from PHP or from the command line.</p>
7681
<h3 id="command-line">Command line</h3>
@@ -97,7 +102,7 @@ <h3 id="php">PHP</h3>
97102
</article>
98103
<nav class="pager" aria-label="Page navigation"><a class="pager-link" href="../"><span>Previous</span><strong>Docsmith</strong></a><a class="pager-link pager-link-next" href="../usage/"><span>Next</span><strong>Usage</strong></a></nav>
99104
</main>
100-
<aside class="toc-sidebar" data-docsmith-toc><p class="toc-title">On this page</p><nav class="toc-links"><a class="toc-link toc-link-level-2" href="#requirements" data-docsmith-toc-link="requirements">Requirements</a><a class="toc-link toc-link-level-2" href="#install-the-package" data-docsmith-toc-link="install-the-package">Install the package</a><a class="toc-link toc-link-level-2" href="#install-the-ai-agent-skill" data-docsmith-toc-link="install-the-ai-agent-skill">Install the AI agent skill</a><a class="toc-link toc-link-level-3" href="#via-laravel-boost" data-docsmith-toc-link="via-laravel-boost">Via Laravel Boost</a><a class="toc-link toc-link-level-3" href="#via-the-skills-cli" data-docsmith-toc-link="via-the-skills-cli">Via the skills CLI</a><a class="toc-link toc-link-level-2" href="#build-documentation" data-docsmith-toc-link="build-documentation">Build documentation</a><a class="toc-link toc-link-level-3" href="#command-line" data-docsmith-toc-link="command-line">Command line</a><a class="toc-link toc-link-level-3" href="#php" data-docsmith-toc-link="php">PHP</a></nav></aside>
105+
<aside class="toc-sidebar" data-docsmith-toc><p class="toc-title">On this page</p><nav class="toc-links"><a class="toc-link toc-link-level-2" href="#requirements" data-docsmith-toc-link="requirements">Requirements</a><a class="toc-link toc-link-level-2" href="#install-the-package" data-docsmith-toc-link="install-the-package">Install the package</a><a class="toc-link toc-link-level-2" href="#install-the-ai-agent-skills" data-docsmith-toc-link="install-the-ai-agent-skills">Install the AI agent skills</a><a class="toc-link toc-link-level-3" href="#via-laravel-boost" data-docsmith-toc-link="via-laravel-boost">Via Laravel Boost</a><a class="toc-link toc-link-level-3" href="#via-the-skills-cli" data-docsmith-toc-link="via-the-skills-cli">Via the skills CLI</a><a class="toc-link toc-link-level-2" href="#build-documentation" data-docsmith-toc-link="build-documentation">Build documentation</a><a class="toc-link toc-link-level-3" href="#command-line" data-docsmith-toc-link="command-line">Command line</a><a class="toc-link toc-link-level-3" href="#php" data-docsmith-toc-link="php">PHP</a></nav></aside>
101106
</div>
102107
<div class="search-overlay" data-docsmith-search-overlay hidden role="dialog" aria-label="Search documentation">
103108
<div class="search-overlay-backdrop" data-docsmith-search-overlay-close></div>

0 commit comments

Comments
 (0)