-
Notifications
You must be signed in to change notification settings - Fork 5
feat(docs): comprehensive documentation and website improvements #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Website improvements: - Add AdvancedFeatures component for Memory, Primer, Mesh, Messaging - Add UseCases component with real-world scenarios - Add TeamEnterprise component for collaboration features - Update Hero section with better value proposition - Make all components mobile responsive - Pre-populate StackBuilder with default skills - Add ARIA attributes for accessibility - Add prefers-reduced-motion for smooth scrolling Documentation updates: - Create primer.mdx for auto-generate instructions feature - Create teams.mdx for team collaboration documentation - Enhance index.mdx with comprehensive feature overview - Update quickstart.mdx with advanced features section - Expand api-reference.mdx with Mesh, Messaging, Workflow APIs - Update configuration.mdx with Memory, Mesh, Primer settings - Simplify fumadocs homepage for cleaner presentation - Fix markdown formatting issues
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdded new public type interfaces (Skill.agent, SkillMetadata, ProjectAnalysis, MeshMessage, WorkflowResult), expanded documentation (Primer, Mesh, Messaging, Teams, configuration, quickstart), bumped site to v1.8.0, redesigned home/layout and multiple React docs components, and introduced styling/UX enhancements and new docs navigation entries. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/skillkit/App.tsx (1)
22-33:⚠️ Potential issue | 🟡 MinorRespect prefers-reduced-motion in smooth scrolling.
Currently both scroll helpers always use smooth behavior, which ignores user motion preferences.
♿ Suggested fix
function scrollToTop(e: React.MouseEvent): void { e.preventDefault(); - window.scrollTo({ top: 0, behavior: 'smooth' }); + const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; + const behavior: ScrollBehavior = prefersReducedMotion ? 'auto' : 'smooth'; + window.scrollTo({ top: 0, behavior }); } function scrollToSection(e: React.MouseEvent, sectionId: string): void { e.preventDefault(); const element = document.getElementById(sectionId); if (element) { - element.scrollIntoView({ behavior: 'smooth' }); + const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; + const behavior: ScrollBehavior = prefersReducedMotion ? 'auto' : 'smooth'; + element.scrollIntoView({ behavior }); history.replaceState(null, '', `#${sectionId}`); } }
🤖 Fix all issues with AI agents
In `@docs/fumadocs/content/docs/api-reference.mdx`:
- Around line 152-179: The snippet uses meshHost: host but never defines host;
update the example to make it self-contained by either adding a short inline
stub variable (e.g., const host = 'ws://localhost:3000' or the Mesh example
variable) or a one-line comment that references where to obtain host; modify the
code around the MessagingClient instantiation (MessagingClient, meshHost) so the
snippet defines host before use or clearly documents its source.
- Around line 101-118: The examples call fs.writeFile but never import fs;
update both snippets to import the promises-based FS API (e.g., add an import
for fs from 'fs/promises' or import * as fs from 'fs/promises') so that
fs.writeFile used alongside analyzeProject and generateInstructions works;
modify the top of the snippet containing analyzeProject/generateInstructions
(and the other similar snippet) to include the fs import and ensure any awaits
run inside an async context if needed.
In `@docs/fumadocs/content/docs/configuration.mdx`:
- Around line 89-210: The example skillkit.yaml contains unsupported keys—remove
the "Memory System", "Mesh Network", "Messaging", and "Primer" sections from the
examples and replace the example config blocks so they only use the actual
SkillkitConfig properties (version, agent, skillsDir, enabledSkills,
disabledSkills, autoSync, cacheDir, marketplaceSources, defaultTimeout) to match
packages/core/src/types.ts; also fix the Configuration Profiles example to use
valid ProfileName values ('dev', 'review', 'research', 'security', 'custom')
instead of "development" and "production" so it aligns with
packages/resources/src/profiles/types.ts.
In `@docs/fumadocs/content/docs/teams.mdx`:
- Around line 451-456: The "Next Steps" section contains a broken "Private
Registries" link pointing to /docs/registries; either remove that bullet or
create the missing documentation page for "Private Registries" so the link
resolves. If you create the page, add a new registries doc with at least a title
and basic content explaining private registry setup and usage, and ensure the
link target "/docs/registries" matches the new document's slug; if you remove
it, update the list to only include the existing CI/CD, Workflows, and Testing
links.
In `@docs/skillkit/components/AdvancedFeatures.tsx`:
- Around line 114-147: The tablist maps ADVANCED_FEATURES using the loop
variable f and tracks the selected key in activeFeature, but the tabpanel uses
feature.id (nonexistent) causing aria-controls targets to point to missing IDs;
change the panel's id and aria-labelledby to use a stable ID derived from
activeFeature (e.g. id={`tabpanel-${activeFeature}`} and
aria-labelledby={`tab-${activeFeature}`}) or a single constant panel ID used by
every tab, and ensure setActiveFeature still updates activeFeature so the tab
buttons' aria-controls match the existing panel element.
In `@docs/skillkit/components/TeamEnterprise.tsx`:
- Around line 110-120: The documentation CTA anchor in TeamEnterprise.tsx uses a
misspelled href ("https://agenstskills.com/docs"); update the href value on the
<a> element (the anchor with inner text "Read the Documentation" inside the
TeamEnterprise component) to the correct URL "https://agentskills.com/docs"
while keeping target="_blank", rel="noopener noreferrer", and the existing
className and content unchanged.
- Around line 94-104: The anchor in the TeamEnterprise component has a typo in
its href domain; update the href value on the <a> element in TeamEnterprise.tsx
from "https://agenstskills.com/docs/api-reference" to the correct domain
"https://agentskills.com/docs/api-reference" so the View API link points to the
proper site; verify the anchor with className "inline-flex items-center gap-2
px-3 ..." is the one being edited.
🧹 Nitpick comments (5)
docs/skillkit/components/StackBuilder.tsx (1)
60-72: Consider lazy-initializing the default stack to avoid a post-mount re-render.
Right now the stack renders empty for the first paint and then fills after the effect. A lazyuseStateinitializer can compute the defaults synchronously and avoid the extra render. Line 60 is where this change would help.♻️ Suggested refactor
- const [stack, setStack] = useState<StackItem[]>([]); + const [stack, setStack] = useState<StackItem[]>(() => { + const initialStack: StackItem[] = []; + DEFAULT_SKILLS.forEach(query => { + const results = searchSkills(query); + if (results.length > 0 && !initialStack.some(s => s.id === results[0].id)) { + initialStack.push({ ...results[0], addedAt: Date.now() }); + } + }); + return initialStack; + }); ... - useEffect(() => { - const initialStack: StackItem[] = []; - DEFAULT_SKILLS.forEach(query => { - const results = searchSkills(query); - if (results.length > 0 && !initialStack.some(s => s.id === results[0].id)) { - initialStack.push({ ...results[0], addedAt: Date.now() }); - } - }); - if (initialStack.length > 0) { - setStack(initialStack); - } - }, []);docs/fumadocs/src/app/(home)/page.tsx (1)
9-12: Avoid hard-coded version strings to prevent drift.
Consider sourcing the version badge from a shared constant (e.g., package metadata or site config) so it stays in sync as releases progress. Line 11 is where this would matter.docs/skillkit/styles.css (1)
62-98: Consider disabling non-essential animations under reduced motion.
The gradient and hover lift effects can still animate for users who prefer reduced motion. A small override would make this more consistent with the scroll behavior (Line 62 onward).♿ Suggested reduced-motion override
`@media` (prefers-reduced-motion: reduce) { + .gradient-animate { + animation: none; + } + .hover-lift { + transition: none; + } + .hover-lift:hover { + transform: none; + box-shadow: none; + } }docs/fumadocs/content/docs/primer.mdx (1)
196-214: Consider clarifying the illustrative API example.The
writeAgentFilefunction on line 212 is not imported or defined. While this is clearly illustrative pseudo-code, you might want to add a comment or show a more complete implementation to help users understand how to write the files.📝 Optional: More complete example
// Write to files for (const [agent, content] of Object.entries(instructions)) { - await writeAgentFile(agent, content); + // Example: write to agent-specific paths + const path = `.${agent}/instructions.md`; + await fs.writeFile(path, content); }docs/skillkit/components/AdvancedFeatures.tsx (1)
185-186: Prefer a stable key for command rows.Using the array index can lead to unnecessary re-mounts if the list changes.
♻️ Suggested refactor
- {feature.commands.map((cmd, index) => ( - <div key={index} className="group"> + {feature.commands.map((cmd) => ( + <div key={cmd.cmd} className="group">
| ## Advanced Configuration | ||
|
|
||
| ### Memory System | ||
|
|
||
| ```yaml | ||
| # skillkit.yaml | ||
| memory: | ||
| enabled: true | ||
| tier: personal # personal, project, global | ||
| compression: | ||
| minObservations: 10 # Compress after N observations | ||
| autoExport: true # Auto-export as skills | ||
| storage: | ||
| backend: cozodb # cozodb, sqlite, memory | ||
| path: ~/.skillkit/memory | ||
| ``` | ||
|
|
||
| ### Mesh Network | ||
|
|
||
| ```yaml | ||
| # skillkit.yaml | ||
| mesh: | ||
| enabled: true | ||
| hostId: my-workstation | ||
| discovery: | ||
| method: local # local, tailscale, manual | ||
| port: 9876 | ||
| security: | ||
| mode: secure # development, signed, secure, strict | ||
| keyPath: ~/.skillkit/mesh/keys | ||
| peers: | ||
| - id: laptop-dev | ||
| address: 192.168.1.100 | ||
| trusted: true | ||
| ``` | ||
|
|
||
| ### Messaging | ||
|
|
||
| ```yaml | ||
| # skillkit.yaml | ||
| messaging: | ||
| enabled: true | ||
| storagePath: ~/.skillkit/messages | ||
| notifications: true | ||
| autoArchive: | ||
| enabled: true | ||
| afterDays: 30 | ||
| ``` | ||
|
|
||
| ### Primer | ||
|
|
||
| ```yaml | ||
| # skillkit.yaml | ||
| primer: | ||
| autoGenerate: true # Generate on changes | ||
| agents: | ||
| priority: [claude, cursor, windsurf] | ||
| customize: | ||
| tone: detailed # concise, detailed, technical | ||
| includeExamples: true | ||
| exclude: | ||
| - node_modules | ||
| - dist | ||
| - .next | ||
| ``` | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
| ~/.skillkit/ | ||
| ├── preferences.json # User preferences | ||
| ├── cache/ # Marketplace cache | ||
| └── memory/ # Learning storage | ||
| ├── observations/ | ||
| ├── learnings/ | ||
| └── index.json | ||
| ├── memory/ # Learning storage | ||
| │ ├── observations/ | ||
| │ ├── learnings/ | ||
| │ └── index.json | ||
| ├── mesh/ # Mesh network | ||
| │ ├── keys/ # Encryption keys | ||
| │ ├── peers.json # Known peers | ||
| │ └── config.json | ||
| └── messages/ # Inter-agent messages | ||
| ├── inbox/ | ||
| ├── sent/ | ||
| └── archived/ | ||
|
|
||
| ./project/ | ||
| ├── skillkit.yaml # Project config | ||
| ├── .skills # Team manifest | ||
| └── skills/ # Local skills | ||
| ├── skills/ # Local skills | ||
| └── .skillkit/ # Project-specific | ||
| ├── cache/ | ||
| ├── primer-config.json | ||
| └── memory/ | ||
| ``` | ||
|
|
||
| ## Configuration Profiles | ||
|
|
||
| Create different profiles for different environments: | ||
|
|
||
| ```yaml | ||
| # skillkit.yaml | ||
| profiles: | ||
| development: | ||
| agent: claude | ||
| autoSync: true | ||
| mesh: | ||
| security: | ||
| mode: development | ||
|
|
||
| production: | ||
| agent: universal | ||
| autoSync: false | ||
| mesh: | ||
| security: | ||
| mode: strict | ||
| ``` | ||
|
|
||
| Use profiles: | ||
|
|
||
| ```bash | ||
| skillkit --profile production sync | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's explore the repository structure to understand the project layout
git ls-files | head -20Repository: rohitg00/skillkit
Length of output: 575
🏁 Script executed:
# Search for configuration schema, type definitions, or config-related files
fd -e "py" -e "ts" -e "js" -e "yaml" -e "yml" -e "json" | grep -i "config\|schema" | head -20Repository: rohitg00/skillkit
Length of output: 637
🏁 Script executed:
# Search for the specific config keys mentioned in the documentation
rg -n "memory:|mesh:|messaging:|primer:|profiles:" --max-count=20Repository: rohitg00/skillkit
Length of output: 2147
🏁 Script executed:
# Look for skillkit configuration handling
rg -n "skillkit\.yaml|skillkit config" -i --max-count=20Repository: rohitg00/skillkit
Length of output: 1697
🏁 Script executed:
# Search for enum or constant definitions related to the config options
rg -n "personal.*project.*global|development.*production.*strict" --max-count=20Repository: rohitg00/skillkit
Length of output: 166
🏁 Script executed:
# Read the main config.ts file to see actual configuration structure
cat packages/core/src/config.tsRepository: rohitg00/skillkit
Length of output: 4533
🏁 Script executed:
# Also check the CLI config handling
cat packages/cli/src/commands/settings.tsRepository: rohitg00/skillkit
Length of output: 7353
🏁 Script executed:
# Look for the profiles types definition
cat packages/resources/src/profiles/types.tsRepository: rohitg00/skillkit
Length of output: 463
🏁 Script executed:
# Check if there's actual implementation of memory configuration
fd "config" packages/memory packages/mesh packages/messaging packages/mcp-memory -e "ts" -e "js" | head -10Repository: rohitg00/skillkit
Length of output: 267
🏁 Script executed:
# Find and read the SkillkitConfig type definition
fd "types" packages/core/src -e "ts" | xargs grep -l "SkillkitConfig"Repository: rohitg00/skillkit
Length of output: 87
🏁 Script executed:
# Search for the complete SkillkitConfig type definition
rg -A 30 "export.*type SkillkitConfig|export interface SkillkitConfig"Repository: rohitg00/skillkit
Length of output: 2628
🏁 Script executed:
# Check mesh config implementation
cat packages/mesh/src/config/hosts-config.tsRepository: rohitg00/skillkit
Length of output: 4220
🏁 Script executed:
# Check mesh security config
cat packages/mesh/src/security/config.tsRepository: rohitg00/skillkit
Length of output: 4528
🏁 Script executed:
# Search for memory, messaging, primer configuration definitions
rg -n "memory.*config|messaging.*config|primer.*config" -i --max-count=20Repository: rohitg00/skillkit
Length of output: 3331
🏁 Script executed:
# Read the full types.ts file to find SkillkitConfig definition
cat packages/core/src/types.ts | head -150Repository: rohitg00/skillkit
Length of output: 3530
🏁 Script executed:
# Look for the Zod schema definition for SkillkitConfig
rg -B 20 "export type SkillkitConfig = z.infer" packages/core/src/types.tsRepository: rohitg00/skillkit
Length of output: 754
🏁 Script executed:
# Check if memory/mesh/messaging/primer are part of skillkit.yaml or separate configs
rg -n "skillkit.yaml" docs/fumadocs/content/docs/configuration.mdx -A 5 -B 5 | head -80Repository: rohitg00/skillkit
Length of output: 1778
Remove the Memory System, Mesh Network, Messaging, and Primer configuration sections from the skillkit.yaml examples—these are not part of the actual SkillkitConfig schema.
The verified SkillkitConfig schema (from packages/core/src/types.ts) only supports: version, agent, skillsDir, enabledSkills, disabledSkills, autoSync, cacheDir, marketplaceSources, and defaultTimeout. The documented sections for memory, mesh, messaging, and primer configuration do not exist in skillkit.yaml and will not be recognized by the configuration parser.
Additionally, fix the Configuration Profiles section: profile names should be 'dev', 'review', 'research', 'security', or 'custom'—not 'development' and 'production' (which don't exist in the actual ProfileName type from packages/resources/src/profiles/types.ts).
🤖 Prompt for AI Agents
In `@docs/fumadocs/content/docs/configuration.mdx` around lines 89 - 210, The
example skillkit.yaml contains unsupported keys—remove the "Memory System",
"Mesh Network", "Messaging", and "Primer" sections from the examples and replace
the example config blocks so they only use the actual SkillkitConfig properties
(version, agent, skillsDir, enabledSkills, disabledSkills, autoSync, cacheDir,
marketplaceSources, defaultTimeout) to match packages/core/src/types.ts; also
fix the Configuration Profiles example to use valid ProfileName values ('dev',
'review', 'research', 'security', 'custom') instead of "development" and
"production" so it aligns with packages/resources/src/profiles/types.ts.
| <a | ||
| href="https://agenstskills.com/docs/api-reference" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-2 px-3 sm:px-4 py-2 bg-zinc-800 text-white font-mono text-xs sm:text-sm hover:bg-zinc-700 transition-colors border border-zinc-700 whitespace-nowrap" | ||
| > | ||
| <span>View API</span> | ||
| <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> | ||
| </svg> | ||
| </a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in URL domain name: "agenstskills" should be "agentskills".
The URL https://agenstskills.com/docs/api-reference appears to have a typo - it's missing the 't' in "agents".
🔗 Proposed fix
<a
- href="https://agenstskills.com/docs/api-reference"
+ href="https://agentskills.com/docs/api-reference"
target="_blank"
rel="noopener noreferrer"🤖 Prompt for AI Agents
In `@docs/skillkit/components/TeamEnterprise.tsx` around lines 94 - 104, The
anchor in the TeamEnterprise component has a typo in its href domain; update the
href value on the <a> element in TeamEnterprise.tsx from
"https://agenstskills.com/docs/api-reference" to the correct domain
"https://agentskills.com/docs/api-reference" so the View API link points to the
proper site; verify the anchor with className "inline-flex items-center gap-2
px-3 ..." is the one being edited.
| <a | ||
| href="https://agenstskills.com/docs" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-2 px-4 sm:px-6 py-2.5 sm:py-3 bg-white text-black font-mono text-xs sm:text-sm hover:bg-zinc-200 transition-colors cursor-pointer" | ||
| > | ||
| <span>Read the Documentation</span> | ||
| <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> | ||
| </svg> | ||
| </a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same URL typo in the documentation CTA link.
🔗 Proposed fix
<a
- href="https://agenstskills.com/docs"
+ href="https://agentskills.com/docs"
target="_blank"
rel="noopener noreferrer"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <a | |
| href="https://agenstskills.com/docs" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="inline-flex items-center gap-2 px-4 sm:px-6 py-2.5 sm:py-3 bg-white text-black font-mono text-xs sm:text-sm hover:bg-zinc-200 transition-colors cursor-pointer" | |
| > | |
| <span>Read the Documentation</span> | |
| <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> | |
| </svg> | |
| </a> | |
| <a | |
| href="https://agentskills.com/docs" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="inline-flex items-center gap-2 px-4 sm:px-6 py-2.5 sm:py-3 bg-white text-black font-mono text-xs sm:text-sm hover:bg-zinc-200 transition-colors cursor-pointer" | |
| > | |
| <span>Read the Documentation</span> | |
| <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> | |
| </svg> | |
| </a> |
🤖 Prompt for AI Agents
In `@docs/skillkit/components/TeamEnterprise.tsx` around lines 110 - 120, The
documentation CTA anchor in TeamEnterprise.tsx uses a misspelled href
("https://agenstskills.com/docs"); update the href value on the <a> element (the
anchor with inner text "Read the Documentation" inside the TeamEnterprise
component) to the correct URL "https://agentskills.com/docs" while keeping
target="_blank", rel="noopener noreferrer", and the existing className and
content unchanged.
- Add missing fs import to api-reference.mdx code examples - Clarify that host comes from MeshHost in messaging example - Remove broken /docs/registries link from teams.mdx - Fix ARIA tab/panel linkage in AdvancedFeatures.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/fumadocs/content/docs/api-reference.mdx`:
- Around line 154-160: The example uses a literal tilde in the MessagingClient
storagePath which Node.js won't expand; update the MessagingClient instantiation
to compute the path using the user's home directory (e.g., use os.homedir() and
path.join()) instead of '~/.skillkit/messages' so storagePath points to the
actual home-based folder; change the example around the MessagingClient
constructor to import/require os and path and build the storagePath via
path.join(os.homedir(), '.skillkit', 'messages').
🧹 Nitpick comments (3)
docs/skillkit/components/AdvancedFeatures.tsx (3)
20-41: Mark decorative SVGs as aria-hidden.
These icons appear purely decorative; hiding them reduces screen reader noise.♿ Suggested tweak (apply to all decorative SVGs)
- <svg className="w-8 h-8" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <svg className="w-8 h-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" focusable="false">
88-90: Derive the default active feature from the source data.
Avoids drift if the first item changes or gets renamed.♻️ Proposed change
- const [activeFeature, setActiveFeature] = useState<string>('memory'); + const [activeFeature, setActiveFeature] = useState<string>(ADVANCED_FEATURES[0]?.id ?? 'memory');
185-193: Prefer a stable key over the array index.
Keeps DOM identity stable if commands are reordered or filtered.🧹 Suggested tweak
- {feature.commands.map((cmd, index) => ( - <div key={index} className="group"> + {feature.commands.map((cmd) => ( + <div key={`${feature.id}-${cmd.cmd}`} className="group">
| import { MessagingClient } from '@skillkit/messaging' | ||
|
|
||
| // Create messaging client (host is a MeshHost instance from the example above) | ||
| const messaging = new MessagingClient({ | ||
| meshHost: host, // See MeshHost setup in "Mesh Network" section above | ||
| storagePath: '~/.skillkit/messages', | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Node.js does ~ tilde expand home directory in file paths fs module
💡 Result:
Node’s fs APIs do not perform ~ (tilde) expansion. ~ expansion is typically done by your shell (bash/zsh/etc.), not by filesystem syscalls or Node’s fs module—so fs.readFile('~/x') will look for a literal directory named ~. [2][3]
Use os.homedir() (recommended) and rewrite only a leading ~ yourself: [1][2]
import os from "node:os";
import path from "node:path";
function expandHome(p) {
if (p === "~") return os.homedir();
if (p.startsWith("~/") || p.startsWith("~\\")) {
return path.join(os.homedir(), p.slice(2));
}
return p;
}
// example:
const filename = expandHome("~/Documents/file.txt");If you prefer a library, common options are untildify or expand-tilde. [4][5]
Sources: Node os.homedir() docs [1]; explanation that Node fs doesn’t expand ~ [2][3]; untildify [4]; expand-tilde [5].
Avoid ~ in storagePath—Node.js won't expand it.
~/.skillkit/messages will be treated as a literal folder name, not the user's home directory. Use os.homedir() with path.join() so the example works as intended.
🔧 Suggested fix
-import { MessagingClient } from '@skillkit/messaging'
+import { MessagingClient } from '@skillkit/messaging'
+import { homedir } from 'node:os'
+import { join } from 'node:path'
@@
- storagePath: '~/.skillkit/messages',
+ storagePath: join(homedir(), '.skillkit/messages'),🤖 Prompt for AI Agents
In `@docs/fumadocs/content/docs/api-reference.mdx` around lines 154 - 160, The
example uses a literal tilde in the MessagingClient storagePath which Node.js
won't expand; update the MessagingClient instantiation to compute the path using
the user's home directory (e.g., use os.homedir() and path.join()) instead of
'~/.skillkit/messages' so storagePath points to the actual home-based folder;
change the example around the MessagingClient constructor to import/require os
and path and build the storagePath via path.join(os.homedir(), '.skillkit',
'messages').
Summary
Website Changes
Documentation Changes
Accessibility
Test Plan
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.