MCPcopy Create free account
hub / github.com/clawshell/clawshell / write_onboard_openclaw_skill

Function write_onboard_openclaw_skill

src/main.rs:175–195  ·  view source on GitHub ↗

Write every ClawShell-managed skill that applies to this onboarding run into OpenClaw's skills directory. The stats skill is always written; the email skill is written only when the onboarding config has email integration enabled. Returns the written skills in installation order.

(
    ob_config: &crate::onboard::OnboardConfig,
    openclaw_config_path: &Path,
)

Source from the content-addressed store, hash-verified

173/// has email integration enabled. Returns the written skills in
174/// installation order.
175fn write_onboard_openclaw_skill(
176 ob_config: &crate::onboard::OnboardConfig,
177 openclaw_config_path: &Path,
178) -> Result<Vec<WrittenOpenclawSkill>, Box<dyn Error>> {
179 let mut written = Vec::new();
180
181 let stats_skill = onboard::render_admin_stats_skill(ob_config);
182 written.push(write_openclaw_skill_bundle(
183 stats_skill,
184 openclaw_config_path,
185 )?);
186
187 if let Some(email_skill) = onboard::render_email_messages_skill(ob_config) {
188 written.push(write_openclaw_skill_bundle(
189 email_skill,
190 openclaw_config_path,
191 )?);
192 }
193
194 Ok(written)
195}
196
197/// Resolve the home directory and uid:gid of the user running onboarding.
198/// When clawshell is invoked under sudo, prefer SUDO_USER over root so we

Callers 1

Calls 3

render_admin_stats_skillFunction · 0.85

Tested by

no test coverage detected