MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getPromptWhileMarketplaceIsPrivate

Function getPromptWhileMarketplaceIsPrivate

src/commands/security-review.ts:205–242  ·  view source on GitHub ↗
(_args, context)

Source from the content-addressed store, hash-verified

203 pluginName: 'security-review',
204 pluginCommand: 'security-review',
205 async getPromptWhileMarketplaceIsPrivate(_args, context) {
206 // Parse frontmatter from the markdown
207 const parsed = parseFrontmatter(SECURITY_REVIEW_MARKDOWN)
208
209 // Parse allowed tools from frontmatter
210 const allowedTools = parseSlashCommandToolsFromFrontmatter(
211 parsed.frontmatter['allowed-tools'],
212 )
213
214 // Execute bash commands in the prompt
215 const processedContent = await executeShellCommandsInPrompt(
216 parsed.content,
217 {
218 ...context,
219 getAppState() {
220 const appState = context.getAppState()
221 return {
222 ...appState,
223 toolPermissionContext: {
224 ...appState.toolPermissionContext,
225 alwaysAllowRules: {
226 ...appState.toolPermissionContext.alwaysAllowRules,
227 command: allowedTools,
228 },
229 },
230 }
231 },
232 },
233 'security-review',
234 )
235
236 return [
237 {
238 type: 'text',
239 text: processedContent,
240 },
241 ]
242 },
243})
244
245

Callers 1

getPromptForCommandFunction · 0.70

Calls 3

parseFrontmatterFunction · 0.85

Tested by

no test coverage detected