MCPcopy Create free account
hub / github.com/MemTensor/MemOS / insertSkill

Method insertSkill

packages/memos-core/src/storage/sqlite.ts:1749–1754  ·  view source on GitHub ↗
(skill: Skill)

Source from the content-addressed store, hash-verified

1747 // ─── Skill CRUD ───
1748
1749 insertSkill(skill: Skill): void {
1750 this.db.prepare(`
1751 INSERT OR REPLACE INTO skills (id, name, description, version, status, tags, source_type, dir_path, installed, owner, visibility, quality_score, created_at, updated_at)
1752 VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
1753 `).run(skill.id, skill.name, skill.description, skill.version, skill.status, skill.tags, skill.sourceType, skill.dirPath, skill.installed, skill.owner ?? "agent:main", skill.visibility ?? "private", skill.qualityScore, skill.createdAt, skill.updatedAt);
1754 }
1755
1756 getSkill(skillId: string): Skill | null {
1757 const row = this.db.prepare("SELECT * FROM skills WHERE id = ?").get(skillId) as SkillRow | undefined;

Callers 2

generateMethod · 0.45

Calls 2

prepareMethod · 0.80
runMethod · 0.65

Tested by

no test coverage detected