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,
)
| 173 | /// has email integration enabled. Returns the written skills in |
| 174 | /// installation order. |
| 175 | fn 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 |
no test coverage detected