fix(docs): rewrite broken relative links in agent and command pages
Add rewrite_relative_links() to generate-docs.py that converts ../../ relative paths to absolute GitHub URLs. Sibling agent links (e.g., cs-foo.md → cs-bar.md) are preserved as local doc links. Regenerated all agent pages with fixed references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -406,11 +406,11 @@ echo "Location: ../../product-team/agile-product-owner/references/user-story-tem
|
||||
|
||||
## References
|
||||
|
||||
- **Primary Skill:** [../../product-team/agile-product-owner/SKILL.md](../../product-team/agile-product-owner/SKILL.md)
|
||||
- **RICE Framework:** [../../product-team/product-manager-toolkit/SKILL.md](../../product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](../../product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Scrum Master Skill:** [../../project-management/scrum-master/SKILL.md](../../project-management/scrum-master/SKILL.md)
|
||||
- **Primary Skill:** [../../product-team/agile-product-owner/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/agile-product-owner/SKILL.md)
|
||||
- **RICE Framework:** [../../product-team/product-manager-toolkit/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
- **Scrum Master Skill:** [../../project-management/scrum-master/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/scrum-master/SKILL.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -346,14 +346,14 @@ esac
|
||||
## Related Agents
|
||||
|
||||
- [cs-cto-advisor](cs-cto-advisor.md) - Technology strategy and engineering leadership (CTO counterpart)
|
||||
- [cs-product-manager](../product/cs-product-manager.md) - Product strategy and roadmap execution (planned)
|
||||
- [cs-growth-strategist](../business-growth/cs-growth-strategist.md) - Growth strategy and market expansion (planned)
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) - Product strategy and roadmap execution (planned)
|
||||
- [cs-growth-strategist](https://github.com/alirezarezvani/claude-skills/tree/main/agents/business-growth/cs-growth-strategist.md) - Growth strategy and market expansion (planned)
|
||||
|
||||
## References
|
||||
|
||||
- **Skill Documentation:** [../../c-level-advisor/ceo-advisor/SKILL.md](../../c-level-advisor/ceo-advisor/SKILL.md)
|
||||
- **C-Level Domain Guide:** [../../c-level-advisor/CLAUDE.md](../../c-level-advisor/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Skill Documentation:** [../../c-level-advisor/ceo-advisor/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/c-level-advisor/ceo-advisor/SKILL.md)
|
||||
- **C-Level Domain Guide:** [../../c-level-advisor/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/c-level-advisor/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -237,10 +237,10 @@ cat ../../marketing-skill/content-creator/references/analytics_guide.md
|
||||
|
||||
## References
|
||||
|
||||
- **Skill Documentation:** [../../marketing-skill/content-creator/SKILL.md](../../marketing-skill/content-creator/SKILL.md)
|
||||
- **Marketing Domain Guide:** [../../marketing-skill/CLAUDE.md](../../marketing-skill/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Marketing Roadmap:** [../../marketing-skill/marketing_skills_roadmap.md](../../marketing-skill/marketing_skills_roadmap.md)
|
||||
- **Skill Documentation:** [../../marketing-skill/content-creator/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/content-creator/SKILL.md)
|
||||
- **Marketing Domain Guide:** [../../marketing-skill/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
- **Marketing Roadmap:** [../../marketing-skill/marketing_skills_roadmap.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/marketing_skills_roadmap.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -398,14 +398,14 @@ echo "- Process improvements identified"
|
||||
## Related Agents
|
||||
|
||||
- [cs-ceo-advisor](cs-ceo-advisor.md) - Strategic leadership and organizational development (CEO counterpart)
|
||||
- [cs-fullstack-engineer](../engineering/cs-fullstack-engineer.md) - Fullstack development coordination (planned)
|
||||
- [cs-devops-specialist](../engineering/cs-devops-specialist.md) - DevOps and infrastructure automation (planned)
|
||||
- [cs-fullstack-engineer](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering/cs-fullstack-engineer.md) - Fullstack development coordination (planned)
|
||||
- [cs-devops-specialist](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering/cs-devops-specialist.md) - DevOps and infrastructure automation (planned)
|
||||
|
||||
## References
|
||||
|
||||
- **Skill Documentation:** [../../c-level-advisor/cto-advisor/SKILL.md](../../c-level-advisor/cto-advisor/SKILL.md)
|
||||
- **C-Level Domain Guide:** [../../c-level-advisor/CLAUDE.md](../../c-level-advisor/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Skill Documentation:** [../../c-level-advisor/cto-advisor/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/c-level-advisor/cto-advisor/SKILL.md)
|
||||
- **C-Level Domain Guide:** [../../c-level-advisor/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/c-level-advisor/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -280,10 +280,10 @@ fi
|
||||
|
||||
## References
|
||||
|
||||
- **Skill Documentation:** [../../marketing-skill/marketing-demand-acquisition/SKILL.md](../../marketing-skill/marketing-demand-acquisition/SKILL.md)
|
||||
- **Marketing Domain Guide:** [../../marketing-skill/CLAUDE.md](../../marketing-skill/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Marketing Roadmap:** [../../marketing-skill/marketing_skills_roadmap.md](../../marketing-skill/marketing_skills_roadmap.md)
|
||||
- **Skill Documentation:** [../../marketing-skill/marketing-demand-acquisition/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/marketing-demand-acquisition/SKILL.md)
|
||||
- **Marketing Domain Guide:** [../../marketing-skill/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
- **Marketing Roadmap:** [../../marketing-skill/marketing_skills_roadmap.md](https://github.com/alirezarezvani/claude-skills/tree/main/marketing-skill/marketing_skills_roadmap.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -85,5 +85,5 @@ Engineering team lead coordinating across specializations: frontend, backend, QA
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-senior-engineer](../engineering/cs-senior-engineer.md) -- Architecture decisions, code review, and CI/CD pipeline setup
|
||||
- [cs-product-manager](../product/cs-product-manager.md) -- Feature prioritization and requirements alignment
|
||||
- [cs-senior-engineer](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering/cs-senior-engineer.md) -- Architecture decisions, code review, and CI/CD pipeline setup
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) -- Feature prioritization and requirements alignment
|
||||
|
||||
@@ -109,5 +109,5 @@ python ../../finance/financial-analyst/scripts/dcf_valuation.py valuation_data.j
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-ceo-advisor](../c-level/cs-ceo-advisor.md) -- Strategic financial decisions, board reporting, and fundraising planning
|
||||
- [cs-growth-strategist](../business-growth/cs-growth-strategist.md) -- Revenue operations data and pipeline forecasting inputs
|
||||
- [cs-ceo-advisor](https://github.com/alirezarezvani/claude-skills/tree/main/agents/c-level/cs-ceo-advisor.md) -- Strategic financial decisions, board reporting, and fundraising planning
|
||||
- [cs-growth-strategist](https://github.com/alirezarezvani/claude-skills/tree/main/agents/business-growth/cs-growth-strategist.md) -- Revenue operations data and pipeline forecasting inputs
|
||||
|
||||
@@ -65,5 +65,5 @@ Growth-focused operator covering the full revenue lifecycle: pipeline management
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-product-manager](../product/cs-product-manager.md) -- Product roadmap alignment for sales positioning and feature prioritization
|
||||
- [cs-financial-analyst](../finance/cs-financial-analyst.md) -- Revenue forecasting validation and financial modeling support
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) -- Product roadmap alignment for sales positioning and feature prioritization
|
||||
- [cs-financial-analyst](https://github.com/alirezarezvani/claude-skills/tree/main/agents/finance/cs-financial-analyst.md) -- Revenue forecasting validation and financial modeling support
|
||||
|
||||
@@ -676,9 +676,9 @@ echo "Report: $QUARTER-roadmap.txt"
|
||||
|
||||
## References
|
||||
|
||||
- **Skill Documentation:** [../../product-team/product-manager-toolkit/SKILL.md](../../product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](../../product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Skill Documentation:** [../../product-team/product-manager-toolkit/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -471,17 +471,17 @@ python ../../product-team/product-strategist/scripts/okr_cascade_generator.py gr
|
||||
- [cs-product-manager](cs-product-manager.md) - Feature-level execution, RICE prioritization, PRD development
|
||||
- [cs-agile-product-owner](cs-agile-product-owner.md) - Sprint-level planning and backlog management
|
||||
- [cs-ux-researcher](cs-ux-researcher.md) - User research to validate strategic assumptions
|
||||
- [cs-ceo-advisor](../c-level/cs-ceo-advisor.md) - Company-level strategic alignment
|
||||
- [cs-ceo-advisor](https://github.com/alirezarezvani/claude-skills/tree/main/agents/c-level/cs-ceo-advisor.md) - Company-level strategic alignment
|
||||
- Senior PM Skill - Portfolio context (see `../../project-management/senior-pm/`)
|
||||
|
||||
## References
|
||||
|
||||
- **Primary Skill:** [../../product-team/product-strategist/SKILL.md](../../product-team/product-strategist/SKILL.md)
|
||||
- **Competitive Teardown Skill:** [../../product-team/competitive-teardown/SKILL.md](../../product-team/competitive-teardown/SKILL.md)
|
||||
- **OKR Framework:** [../../product-team/product-strategist/references/okr_framework.md](../../product-team/product-strategist/references/okr_framework.md)
|
||||
- **Strategy Types:** [../../product-team/product-strategist/references/strategy_types.md](../../product-team/product-strategist/references/strategy_types.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](../../product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Primary Skill:** [../../product-team/product-strategist/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-strategist/SKILL.md)
|
||||
- **Competitive Teardown Skill:** [../../product-team/competitive-teardown/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/competitive-teardown/SKILL.md)
|
||||
- **OKR Framework:** [../../product-team/product-strategist/references/okr_framework.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-strategist/references/okr_framework.md)
|
||||
- **Strategy Types:** [../../product-team/product-strategist/references/strategy_types.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-strategist/references/strategy_types.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -497,19 +497,19 @@ echo "Template: ../../project-management/senior-pm/assets/executive_report_templ
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-product-manager](../product/cs-product-manager.md) -- Product prioritization with RICE, customer discovery, PRD development
|
||||
- [cs-agile-product-owner](../product/cs-agile-product-owner.md) -- User story generation, backlog management, acceptance criteria (planned)
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) -- Product prioritization with RICE, customer discovery, PRD development
|
||||
- [cs-agile-product-owner](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-agile-product-owner.md) -- User story generation, backlog management, acceptance criteria (planned)
|
||||
- [cs-scrum-master](cs-scrum-master.md) -- Dedicated Scrum ceremony facilitation and team coaching (planned)
|
||||
|
||||
## References
|
||||
|
||||
- **Senior PM Skill:** [../../project-management/senior-pm/SKILL.md](../../project-management/senior-pm/SKILL.md)
|
||||
- **Scrum Master Skill:** [../../project-management/scrum-master/SKILL.md](../../project-management/scrum-master/SKILL.md)
|
||||
- **Jira Expert Skill:** [../../project-management/jira-expert/SKILL.md](../../project-management/jira-expert/SKILL.md)
|
||||
- **Confluence Expert Skill:** [../../project-management/confluence-expert/SKILL.md](../../project-management/confluence-expert/SKILL.md)
|
||||
- **Atlassian Admin Skill:** [../../project-management/atlassian-admin/SKILL.md](../../project-management/atlassian-admin/SKILL.md)
|
||||
- **PM Domain Guide:** [../../project-management/CLAUDE.md](../../project-management/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Senior PM Skill:** [../../project-management/senior-pm/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/senior-pm/SKILL.md)
|
||||
- **Scrum Master Skill:** [../../project-management/scrum-master/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/scrum-master/SKILL.md)
|
||||
- **Jira Expert Skill:** [../../project-management/jira-expert/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/jira-expert/SKILL.md)
|
||||
- **Confluence Expert Skill:** [../../project-management/confluence-expert/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/confluence-expert/SKILL.md)
|
||||
- **Atlassian Admin Skill:** [../../project-management/atlassian-admin/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/atlassian-admin/SKILL.md)
|
||||
- **PM Domain Guide:** [../../project-management/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/project-management/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -85,5 +85,5 @@ Regulatory affairs and quality management specialist for medical device and heal
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-engineering-lead](../engineering-team/cs-engineering-lead.md) -- Engineering process alignment for design controls and software validation
|
||||
- [cs-product-manager](../product/cs-product-manager.md) -- Product requirements traceability and risk-benefit analysis coordination
|
||||
- [cs-engineering-lead](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering-team/cs-engineering-lead.md) -- Engineering process alignment for design controls and software validation
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) -- Product requirements traceability and risk-benefit analysis coordination
|
||||
|
||||
@@ -87,5 +87,5 @@ Cross-cutting senior engineer covering architecture, backend, DevOps, security,
|
||||
|
||||
## Related Agents
|
||||
|
||||
- [cs-engineering-lead](../engineering-team/cs-engineering-lead.md) -- Team coordination, incident response, and cross-functional delivery
|
||||
- [cs-product-manager](../product/cs-product-manager.md) -- Feature prioritization and requirements context
|
||||
- [cs-engineering-lead](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering-team/cs-engineering-lead.md) -- Team coordination, incident response, and cross-functional delivery
|
||||
- [cs-product-manager](https://github.com/alirezarezvani/claude-skills/tree/main/agents/product/cs-product-manager.md) -- Feature prioritization and requirements context
|
||||
|
||||
@@ -518,14 +518,14 @@ echo "See: ../../product-team/ui-design-system/references/developer-handoff.md"
|
||||
|
||||
## References
|
||||
|
||||
- **Primary Skill:** [../../product-team/ux-researcher-designer/SKILL.md](../../product-team/ux-researcher-designer/SKILL.md)
|
||||
- **Interview Analyzer:** [../../product-team/product-manager-toolkit/SKILL.md](../../product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Persona Methodology:** [../../product-team/ux-researcher-designer/references/persona-methodology.md](../../product-team/ux-researcher-designer/references/persona-methodology.md)
|
||||
- **Journey Mapping Guide:** [../../product-team/ux-researcher-designer/references/journey-mapping-guide.md](../../product-team/ux-researcher-designer/references/journey-mapping-guide.md)
|
||||
- **Usability Testing:** [../../product-team/ux-researcher-designer/references/usability-testing-frameworks.md](../../product-team/ux-researcher-designer/references/usability-testing-frameworks.md)
|
||||
- **Design System:** [../../product-team/ui-design-system/SKILL.md](../../product-team/ui-design-system/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](../../product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](../CLAUDE.md)
|
||||
- **Primary Skill:** [../../product-team/ux-researcher-designer/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/ux-researcher-designer/SKILL.md)
|
||||
- **Interview Analyzer:** [../../product-team/product-manager-toolkit/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/product-manager-toolkit/SKILL.md)
|
||||
- **Persona Methodology:** [../../product-team/ux-researcher-designer/references/persona-methodology.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/ux-researcher-designer/references/persona-methodology.md)
|
||||
- **Journey Mapping Guide:** [../../product-team/ux-researcher-designer/references/journey-mapping-guide.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/ux-researcher-designer/references/journey-mapping-guide.md)
|
||||
- **Usability Testing:** [../../product-team/ux-researcher-designer/references/usability-testing-frameworks.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/ux-researcher-designer/references/usability-testing-frameworks.md)
|
||||
- **Design System:** [../../product-team/ui-design-system/SKILL.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/ui-design-system/SKILL.md)
|
||||
- **Product Domain Guide:** [../../product-team/CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/product-team/CLAUDE.md)
|
||||
- **Agent Development Guide:** [../CLAUDE.md](https://github.com/alirezarezvani/claude-skills/tree/main/agents/CLAUDE.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -155,9 +155,9 @@ gws helpers morning-briefing --json | python3 ../../engineering-team/google-work
|
||||
## Related Agents
|
||||
|
||||
- [cs-engineering-lead](cs-engineering-lead.md) — Engineering team coordination
|
||||
- [cs-senior-engineer](../engineering/cs-senior-engineer.md) — Architecture and CI/CD
|
||||
- [cs-senior-engineer](https://github.com/alirezarezvani/claude-skills/tree/main/agents/engineering/cs-senior-engineer.md) — Architecture and CI/CD
|
||||
|
||||
## References
|
||||
|
||||
- [Skill Documentation](../../engineering-team/google-workspace-cli/SKILL.md)
|
||||
- [Skill Documentation](https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/google-workspace-cli/SKILL.md)
|
||||
- [gws CLI Repository](https://github.com/googleworkspace/cli)
|
||||
|
||||
@@ -143,6 +143,39 @@ def strip_content(content):
|
||||
return content
|
||||
|
||||
|
||||
GITHUB_BASE = "https://github.com/alirezarezvani/claude-skills/tree/main"
|
||||
|
||||
|
||||
def rewrite_relative_links(content, source_rel_path):
|
||||
"""Rewrite relative markdown links (../../, ../) to absolute GitHub URLs.
|
||||
|
||||
Agent and command source files use relative paths like ../../product-team/SKILL.md
|
||||
which break when rendered in the docs site. Convert them to GitHub source links.
|
||||
"""
|
||||
source_dir = os.path.dirname(source_rel_path)
|
||||
|
||||
def resolve_link(match):
|
||||
text = match.group(1)
|
||||
rel_target = match.group(2)
|
||||
# Only rewrite relative paths that go up (../)
|
||||
if not rel_target.startswith("../"):
|
||||
return match.group(0)
|
||||
# Resolve against source directory
|
||||
resolved = os.path.normpath(os.path.join(source_dir, rel_target))
|
||||
# Keep links to sibling .md files in the same docs directory
|
||||
# e.g. agents/product/cs-foo.md linking to cs-bar.md (same-level agent docs)
|
||||
# These resolve to agents/product/cs-bar.md — only keep if they're
|
||||
# a docs page we generate (agent .md that isn't CLAUDE.md)
|
||||
if (resolved.startswith("agents/") and resolved.count("/") == 1
|
||||
and resolved.endswith(".md") and "CLAUDE" not in resolved):
|
||||
# This is a sibling agent doc link — rewrite to flat docs slug
|
||||
sibling = os.path.basename(resolved).replace(".md", "") + ".md"
|
||||
return f"[{text}]({sibling})"
|
||||
return f"[{text}]({GITHUB_BASE}/{resolved})"
|
||||
|
||||
return re.sub(r"\[([^\]]+)\]\((\.\.[^\)]+)\)", resolve_link, content)
|
||||
|
||||
|
||||
def generate_skill_page(skill, domain_key):
|
||||
"""Generate a docs page for a single skill."""
|
||||
skill_md_path = skill["path"]
|
||||
@@ -349,6 +382,7 @@ description: "All {skill_count} {domain_name} skills for Claude Code, Codex CLI,
|
||||
content = f.read()
|
||||
|
||||
content_clean = strip_content(content)
|
||||
content_clean = rewrite_relative_links(content_clean, rel)
|
||||
|
||||
page = f'''---
|
||||
title: "{title}"
|
||||
@@ -424,6 +458,7 @@ description: "All {agent_count} Claude Code agents — multi-skill orchestrators
|
||||
content = f.read()
|
||||
|
||||
content_clean = strip_content(content)
|
||||
content_clean = rewrite_relative_links(content_clean, rel)
|
||||
|
||||
page = f'''---
|
||||
title: "/{cmd_name}"
|
||||
|
||||
Reference in New Issue
Block a user