Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ coderrr market
coderrr install web-scraper

# List installed skills
coderrr skills
coderrr list skills # Preferred command
coderrr skills # Legacy alias (still supported)
```

| Skill | Description |
Expand Down
10 changes: 9 additions & 1 deletion src/skillMarketplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const skillRegistry = require('./skillRegistry');
const { installSkillDependencies } = require('./skillRunner');

// Registry configuration
const REGISTRY_URL = 'https://raw.githubusercontent.com/Akash-nath29/coderrr-skills/main/registry.json';
const REGISTRY_URL = process.env.CODERRR_SKILLS_REGISTRY || 'https://raw.githubusercontent.com/Akash-nath29/coderrr-skills/main/registry.json';
const CACHE_DIR = path.join(os.homedir(), '.coderrr');
const CACHE_FILE = path.join(CACHE_DIR, 'registry-cache.json');
const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
Expand Down Expand Up @@ -75,6 +75,14 @@ async function fetchRegistry() {
const response = await axios.get(REGISTRY_URL, { timeout: 10000 });
const registry = response.data;

// Validate registry format
if (!registry || typeof registry !== 'object') {
throw new Error('Invalid registry format');
}
if (!registry.skills || typeof registry.skills !== 'object') {
throw new Error('Invalid registry format');
}

// Cache the result
saveCache(registry);

Expand Down
13 changes: 13 additions & 0 deletions src/skillsUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,19 @@ function registerSkillCommands(program) {
displaySkillsList();
});

// List resources (skills, recipes, etc.)
program
.command('list <resource>')
.description('List available resources (skills, recipes, etc.)')
.action((resource) => {
if (resource.toLowerCase() === 'skills') {
displaySkillsList();
} else {
console.log(chalk.yellow(`\n▲ Unknown resource: "${resource}"`));
console.log(chalk.gray('Available resources: skills\n'));
}
});

// Install a skill (local or from marketplace)
program
.command('install <source>')
Expand Down