Skip to content

Conversation

@soetang
Copy link

@soetang soetang commented Jan 6, 2026

Hey Kasper - Har vibecodet det her. Ligner det spiller og nogenlunde pænt. Test gerne.

Beskrivelse af ændringer fra claude.

Expanded Repository Support

Overview

Adds support for different repository structures and environments while maintaining 100% backward compatibility.

What's New

Automatic Pattern Detection
Works with multiple repository structures out of the box:

  • .claude/skills/ (backward compatible)
  • skills/ (Anthropics pattern)
  • skill/ (OpenCode pattern)

Environment Support

skill-add username/skill --env opencode   # .opencode/skill/
skill-add username/skill --env codex      # .codex/skills/
skill-add username/skill --global         # ~/.config/opencode/ for OpenCode

New CLI Options

  • --repo REPO_NAME - Use different repository names
  • --dest PATH - Custom installation path
  • --env ENV - Target environment (claude/opencode/codex)

Better Errors
Shows all attempted patterns when resources aren't found, with helpful troubleshooting suggestions.

Testing

5 integration tests covering all user-facing functionality:

  • Backward compatibility
  • Pattern detection (Anthropics, OpenCode)
  • Custom destinations
  • Error messages

Changes

9 files changed, 550 insertions(+), 39 deletions(-)
  • Pattern detection and validation in fetcher.py
  • Environment configuration in cli/common.py
  • New parameters in all CLI commands
  • Added pyyaml>=6.0 dependency
  • Updated documentation

Examples

# Different repo structures - works automatically
skill-add anthropics/analyze-paper --repo skills

# Different environments
skill-add username/skill --env opencode
skill-add username/skill --env codex --global

# Custom destination
skill-add username/skill --dest ./custom/path/

Backward Compatibility

100% compatible - existing commands unchanged. The .claude/ pattern is tried first.

Implemented all 3 phases of the simplified plan:

Phase 1: Pattern-Based Search
- Add automatic pattern detection for different repository structures
- Support .claude/, skills/, and skill/ patterns
- Add --repo parameter for custom repository names
- Add --dest parameter for custom installation paths
- Enhanced error messages showing all attempted patterns

Phase 2: Environment Support
- Add support for multiple environments (claude, opencode, codex)
- Add --env parameter to CLI commands
- OpenCode uses .config/opencode for global installs
- YAML configuration support via ~/.agent-resources-config.yaml

Phase 3: Essential Features
- Add repository structure validation
- Enhanced error messages with helpful suggestions
- Better troubleshooting guidance

Tests:
- 5 integration tests covering all user-facing functionality
- Tests backward compatibility, pattern detection, custom destinations, and error messages

Changes:
- Updated fetcher.py with pattern detection and validation
- Updated CLI files (skill.py, command.py, agent.py) with new parameters
- Updated common.py with environment configuration
- Added PyYAML dependency
- Updated README with usage examples
- Added environment paths to .gitignore

All tests passing, linting clean, type checking successful.
@kasperjunge
Copy link
Owner

@soetang jeg svare lige på engelsk så alle kan følge med 😊👍

Hey @soetang! 👋

Thanks for your contribution! It looks interesting.

Right now, support for Codex and OpenCode isn't our primary focus - we're working on getting the core functionality solid first. Supporting multiple environments will also require too much maintenance at the current stage, so we want to make sure the foundation is in place before expanding scope. That said, it's definitely something we could look at in the near future 🙌

Could you join the discussion in #4 where we're talking about the architecture for multi-environment support? That way we can have a good dialogue about the best approach before merging anything.

#4

Thanks for the interest! 🙏

xlab added a commit to xlab/agent-skills-project that referenced this pull request Jan 7, 2026
@xlab
Copy link

xlab commented Jan 7, 2026

Hey @soetang thanks for your contribution! This is super useful.

Since I also have my stuff backlogged there I've decided to fork the project and incorporate both PRs (#2 - other git hosts) and (#5 - this PR) in https://github.com/xlab/agent-skills-project

% uvx upd-skill snarktank/pdf --repo amp-skills  --env amp
✅ Added skill 'pdf' via 🧩 agent-skills-upd

% uvx upd-skill dsjacobsen/golang-pro --env codex
✅ Added skill 'golang-pro' via 🧩 agent-skills-upd

% uvx upd-skill steipete-weather --env clawd
✅ Added skill 'weather' via 🧩 agent-skills-upd

Result:

.
├── .agents
│   └── skills
│       └── pdf
│           └── SKILL.md
├── .codex
│   └── skills
│       └── golang-pro
│           ├── checklists
│           │   ├── code-review.md
│           │   └── new-project.md
│           ├── examples
│           │   ├── http-service.go
│           │   └── worker-pool.go
│           ├── README.md
│           └── SKILL.md
└── skills
    └── weather
        ├── README.md
        └── SKILL.md

11 directories, 9 files

As you can see there are 3 example sources and 3 targets:

  1. https://github.com/snarktank/amp-skills and installed for Amp
  2. "Classic" https://github.com/dsjacobsen/agent-resources but installed for Codex
  3. Weather skill from https://clawdhub.com/ installed for ClawdBot via mirror https://upd.dev/clawdhub

Pretty cool huh?!

@xlab xlab mentioned this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants