paperclipai/paperclip · error
Skill reference is required.
Error message
Skill reference is required.
What it means
resolveCompanySkillReference trimmed the reference to an empty string, so company skill resolution has no id, key, or slug to match.
Solutions
- Provide a skill reference (ID, key, or slug).
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/client/skills.ts:611 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/de0ef3252b53a4e8.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/skills.ts:611
async function getCatalogSkill(ctx: ResolvedClientContext, catalogRef: string): Promise<CatalogSkill> {
const ref = catalogRef.trim();
if (!ref) {
throw new Error("Catalog skill reference is required.");
}
const detail = await ctx.api.get<CatalogSkill>(`/api/skills/catalog/ref?ref=${encodeURIComponent(ref)}`);
if (!detail) {
throw new Error(`Catalog skill not found: ${catalogRef}`);
}
return detail;
}
export function resolveCompanySkillReference(
skills: CompanySkillReferenceTarget[],
reference: string,
): CompanySkillReferenceTarget {
const trimmed = reference.trim();
if (!trimmed) {
throw new Error("Skill reference is required.");
}
const byId = skills.find((skill) => skill.id === trimmed);
if (byId) return byId;
const byKey = skills.find((skill) => skill.key === trimmed);
if (byKey) return byKey;
const normalizedSlug = normalizeSkillSlug(trimmed);
const bySlug = skills.filter((skill) => skill.slug === normalizedSlug);
if (bySlug.length === 1 && bySlug[0]) return bySlug[0];
if (bySlug.length > 1) {
throw new Error(`Ambiguous skill slug "${trimmed}". Use a skill ID or key instead.`);
}
throw new Error(`Skill not found: ${reference}`);
}
View on GitHub (pinned to 120ae5428f)