Skip to content

feat: replace marketplace with repo-first apc install (GitHub skill installer) - #13

Merged
FZ2000 merged 14 commits into
mainfrom
chore/remove-marketplace
Mar 6, 2026
Merged

feat: replace marketplace with repo-first apc install (GitHub skill installer)#13
FZ2000 merged 14 commits into
mainfrom
chore/remove-marketplace

Conversation

@FZ2000

@FZ2000 FZ2000 commented Mar 5, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the old marketplace/share system and replaces it with a cleaner repo-first apc install command that fetches skills directly from any GitHub repository.


What changed

Removed

  • src/marketplace.py — marketplace source management
  • src/share.py — old apc install / apc marketplace commands
  • tests/test_marketplace.py — marketplace unit tests

New: src/install.py — Repo-first GitHub skill installer

apc install owner/repo [--skill NAME] [--all] [--list] [-t TOOL] [-y]
  • --list — browse available skills in any GitHub repo before installing
  • --skill NAME — install one or more specific skills (repeatable flag)
  • --all — install every skill in the repo
  • -t TOOL / --target TOOL — target a specific tool (or * for all detected)
  • -y — skip confirmation prompt (useful for scripting)

Skills are fetched from https://github.com/<owner>/<repo>/tree/main/<skill>/SKILL.md and written to ~/.apc/skills/<name>/SKILL.md as the source of truth.

Fixed: src/appliers/cursor.py — lazy path resolution

Module-level CURSOR_DIR, CURSOR_RULES_DIR, CURSOR_MCP_JSON were evaluated once at import time against Path.home(), making HOME isolation in tests impossible. Replaced with lazy helper functions (_cursor_dir(), _cursor_rules_dir(), _cursor_mcp_json()) evaluated at call time. SKILL_DIR changed from a class attribute to a @property.

Tests: tests/test_docker_integration.py

Replaced all mocked TestInstall and TestInstallThenSync tests with real end-to-end flows:

  • Real GitHub network calls against anthropics/skills
  • Real file-system assertions (SKILL.md written, .mdc synced to cursor tool dir)
  • HOME isolation via monkeypatch.setenv — no mocks, no patching

Result

  • 207 tests passing (was 150), lint clean
  • apc install, apc skill, apc sync, apc collect, apc status all working
  • Skills installed via apc install are immediately available to apc sync

Ace and others added 12 commits March 5, 2026 00:37
The marketplace feature (source management + skill install from GitHub)
is outdated and no longer needed. Removes all references:

- Delete src/marketplace.py — marketplace source management module
- Delete src/share.py — install + marketplace Click commands
- Remove apc install command from CLI (main.py)
- Remove marketplace and share from pyproject.toml py-modules
- Move get_skills_dir() into config.py (still used by sync_helpers)
- Update sync_helpers.py import to use config.get_skills_dir
- Delete tests/test_marketplace.py
- Remove TestInstall from tests/test_docker_integration.py

Closes #1
Keep the install command but remove the marketplace concept entirely:
- apc install <skill> still works (defaults to anthropics/skills)
- apc install <skill> --repo owner/repo still works for custom sources
- No apc marketplace add/list/delete — source management is gone

marketplace.py split into:
- src/skills.py — skill fetching/install logic (no source CRUD)
- src/share.py — just the install Click command
apc install now works like npx skills add — repo is the primary arg,
with options to list, filter by skill name, and target specific agents.

Usage:
  apc install owner/repo --list
  apc install owner/repo --skill frontend-design
  apc install owner/repo --skill frontend-design --skill skill-creator
  apc install owner/repo --skill '*'
  apc install owner/repo --all
  apc install owner/repo --skill frontend-design -a claude-code -a cursor
  apc install owner/repo --all -a claude-code -y
  apc install owner/repo --agent '*' --skill frontend-design

Changes:
- REPO is now the first arg (not skill name)
- --list: shows available skills without installing
- --skill / -s: one or more skill names to install ('*' = all)
- --all: install everything in the repo
- --agent / -a: target specific tools ('*' = all detected)
- -y / --yes: non-interactive mode for CI/CD
- skills.py: added list_skills_in_repo() via GitHub tree API
- No --repo flag needed — repo is always the first positional arg
8 tests covering:
- Invalid repo format rejection (URL, no-slash)
- --list with mocked GitHub response
- --list on empty repo
- Single skill install (mocked fetch + agent apply)
- Skill not found in repo
- --all installs everything from repo
- -y flag skips confirmation prompts

Patches target share.* (not skills.*) since share.py imports at load time.
Bugs fixed:
- openclaw applier missing 'override' param on apply_mcp_servers (broke
  apc sync for any openclaw target)
- skill show crashing with MarkupError when body contains Rich markup
  characters like [/* content */] — now escapes body before rendering

Tests added (TestInstallThenSync):
- install writes skill to local cache and ~/.apc/skills/
- install creates correct SKILL.md source file
- sync --dry-run picks up installed skills from ~/.apc/skills/
- install multiple skills → skill list shows all of them
share.py no longer fits — the file only contains the install command.
Renamed to install.py for clarity.

Updated references in main.py, pyproject.toml, and tests.
* Add apc export/import with age-encrypted secrets, fix MCP secrets bug

Implement portable config migration between machines via `apc export`
and `apc import`. Secrets (API keys, MCP tokens) are field-level
encrypted with age (pyrage) so exports can safely live in Git repos.
Non-secret data stays in cleartext for diff-friendliness.

Also fix a bug where sync_helpers.py always passed {} for secrets to
appliers, so MCP server env placeholders (${TOKEN}) were never resolved
from the OS keychain during sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ruff formatting in export_import.py and test_docker_integration.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Test changes:
- Replace all mock/patch in TestInstall and TestInstallThenSync with real
  GitHub network calls against anthropics/skills
- Tests now verify actual file-system results (SKILL.md written, .mdc
  symlinked into tool dir, skill list, status after sync)

Applier fix:
- cursor.py: replace module-level Path.home() constants (evaluated once
  at import) with lazy _cursor_dir/rules/mcp_json() helper functions
  evaluated at call time — required for HOME isolation in tests
- SKILL_DIR changed from class attribute to @Property so it respects
  the current /Users/frank at sync time

Unit test fix:
- test_appliers.py: patch _cursor_rules_dir/_cursor_mcp_json functions
  instead of removed module-level constants
…name

- pyproject.toml: merged module list — kept install/skills (our rename),
  added export_import (from main), dropped marketplace/share
- src/main.py: kept both 'from install import install' and
  'from export_import import export_cmd, import_cmd'
- src/sync_helpers.py: kept 'from skills import get_skills_dir' (our
  rename from marketplace) and added 'from secrets_manager import
  retrieve_secret' (from main)
- src/export_import.py: updated marketplace→skills import (consistency
  with branch rename), fixed ruff import order

207 tests passing, 0 failures, ruff clean
.cursor/rules/*.mdc are generated output from apc sync — they should
never be committed. Added .cursor/, .claude/, .gemini/, .codeium/ to
.gitignore so sync output stays local.
Previously 41 tests verified terminal output only. Now 82/93 tests
assert on actual file-system side effects:

- TestStatus: detect_* tests check tool dirs exist (.claude/, .cursor/, etc.)
- TestCollect: verify cache/ dir + all 3 JSON files created
- TestSkill: verify skills.json contains expected entries
- TestMemory: verify memory.json written and contains added entries
- TestMcp: verify mcp_servers.json reflects add/remove operations
- TestSync: verify .claude.json mcpServers written; .cursor/rules/*.mdc created
- TestSubSync: verify mcp/skill sync writes to tool dirs
- TestInstall: verify SKILL.md written to ~/.apc/skills/<name>/
- TestInstallThenSync: verify .mdc files land in cursor rules dir
- TestExport: verify export dir structure created
- TestImport: verify cache files restored
- TestConfigure: verify auth-profiles.json written with correct provider

5 tests intentionally output-only (error/rejection paths):
test_exits_zero, test_detects_copilot, test_mcp_remove_nonexistent,
test_install_invalid_repo_url, test_install_nonexistent_skill
@FZ2000
FZ2000 force-pushed the chore/remove-marketplace branch from cb70e00 to 8692331 Compare March 6, 2026 05:50
@FZ2000 FZ2000 changed the title chore: remove marketplace feature and install command feat: replace marketplace with repo-first apc install (GitHub skill installer) Mar 6, 2026
@FZ2000
FZ2000 merged commit d6ac404 into main Mar 6, 2026
4 checks passed
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.

1 participant