Skip to main content

fp-refactor

Guides developers in refactoring TypeScript code to functional programming patterns using fp-ts for improved error handling and code clarity.

Install this skill

or
0/100

Security score

The fp-refactor skill was audited on May 15, 2026 and we found 48 security issues across 2 threat categories. Review the findings below before installing.

Categories Tested

Security Issues

medium line 62

Template literal with variable interpolation in command context

SourceSKILL.md
62throw new Error(`Invalid JSON: ${error}`);
medium line 113

Template literal with variable interpolation in command context

SourceSKILL.md
113E.mapLeft((e) => new Error(`Invalid JSON: ${e}`))
medium line 164

Template literal with variable interpolation in command context

SourceSKILL.md
164const response = await fetch(`/api/users/${id}`);
medium line 166

Template literal with variable interpolation in command context

SourceSKILL.md
166throw new Error(`HTTP error: ${response.status}`);
medium line 171

Template literal with variable interpolation in command context

SourceSKILL.md
171throw new Error(`Failed to fetch user: ${error}`);
medium line 177

Template literal with variable interpolation in command context

SourceSKILL.md
177const response = await fetch(`/api/users/${userId}/posts`);
medium line 179

Template literal with variable interpolation in command context

SourceSKILL.md
179throw new Error(`HTTP error: ${response.status}`);
medium line 183

Template literal with variable interpolation in command context

SourceSKILL.md
183throw new Error(`Failed to fetch posts: ${error}`);
medium line 211

Template literal with variable interpolation in command context

SourceSKILL.md
211() => fetch(`/api/users/${id}`),
medium line 212

Template literal with variable interpolation in command context

SourceSKILL.md
212(reason) => new Error(`Network error: ${reason}`)
medium line 217

Template literal with variable interpolation in command context

SourceSKILL.md
217: TE.left(new Error(`HTTP error: ${response.status}`))
medium line 222

Template literal with variable interpolation in command context

SourceSKILL.md
222(reason) => new Error(`JSON parse error: ${reason}`)
medium line 231

Template literal with variable interpolation in command context

SourceSKILL.md
231() => fetch(`/api/users/${userId}/posts`),
medium line 232

Template literal with variable interpolation in command context

SourceSKILL.md
232(reason) => new Error(`Network error: ${reason}`)
medium line 237

Template literal with variable interpolation in command context

SourceSKILL.md
237: TE.left(new Error(`HTTP error: ${response.status}`))
medium line 242

Template literal with variable interpolation in command context

SourceSKILL.md
242(reason) => new Error(`JSON parse error: ${reason}`)
medium line 326

Template literal with variable interpolation in command context

SourceSKILL.md
326auth = `${config.database.credentials.username}:${config.database.credentials.password}@`;
medium line 330

Template literal with variable interpolation in command context

SourceSKILL.md
330return `postgres://${auth}${config.database.host}:${port}`;
medium line 363

Template literal with variable interpolation in command context

SourceSKILL.md
363O.map(({ username, password }) => `${username}:${password}@`)
medium line 368

Template literal with variable interpolation in command context

SourceSKILL.md
368return `postgres://${auth}${host}:${port}`;
medium line 477

Template literal with variable interpolation in command context

SourceSKILL.md
477E.fromOption(() => new Error(`User ${id} not found`))
medium line 677

Template literal with variable interpolation in command context

SourceSKILL.md
677this.logger.log(`Updating email for user ${userId}`);
medium line 681

Template literal with variable interpolation in command context

SourceSKILL.md
681this.logger.error(`User ${userId} not found`);
medium line 682

Template literal with variable interpolation in command context

SourceSKILL.md
682throw new Error(`User ${userId} not found`);
medium line 693

Template literal with variable interpolation in command context

SourceSKILL.md
693`Your email has been changed to ${newEmail}`
medium line 696

Template literal with variable interpolation in command context

SourceSKILL.md
696this.logger.log(`Email updated for user ${userId}`);
medium line 774

Template literal with variable interpolation in command context

SourceSKILL.md
774logInfo(`Updating email for user ${userId}`),
medium line 779

Template literal with variable interpolation in command context

SourceSKILL.md
779logError(`User ${userId} not found`),
medium line 780

Template literal with variable interpolation in command context

SourceSKILL.md
780RTE.flatMap(() => RTE.left(new Error(`User ${userId} not found`)))
medium line 792

Template literal with variable interpolation in command context

SourceSKILL.md
792`Your email has been changed to ${newEmail}`
medium line 795

Template literal with variable interpolation in command context

SourceSKILL.md
795RTE.flatMap(() => logInfo(`Email updated for user ${userId}`))
medium line 803

Template literal with variable interpolation in command context

SourceSKILL.md
803log: (msg) => console.log(`[INFO] ${msg}`),
medium line 804

Template literal with variable interpolation in command context

SourceSKILL.md
804error: (msg) => console.error(`[ERROR] ${msg}`),
medium line 850

Template literal with variable interpolation in command context

SourceSKILL.md
850log: (msg) => logs.push(`[INFO] ${msg}`),
medium line 851

Template literal with variable interpolation in command context

SourceSKILL.md
851error: (msg) => logs.push(`[ERROR] ${msg}`),
medium line 1136

Template literal with variable interpolation in command context

SourceSKILL.md
1136return fetch(`/api/users/${userId}`)
medium line 1139

Template literal with variable interpolation in command context

SourceSKILL.md
1139throw new Error(`HTTP ${response.status}`);
medium line 1180

Template literal with variable interpolation in command context

SourceSKILL.md
1180() => fetch(`/api/users/${userId}`),
medium line 1181

Template literal with variable interpolation in command context

SourceSKILL.md
1181(e) => new Error(`Network error: ${e}`)
medium line 1187

Template literal with variable interpolation in command context

SourceSKILL.md
1187(e) => new Error(`Parse error: ${e}`)
medium line 1189

Template literal with variable interpolation in command context

SourceSKILL.md
1189: TE.left(new Error(`HTTP ${response.status}`))
medium line 1396

Template literal with variable interpolation in command context

SourceSKILL.md
1396(reason) => new Error(`Network request failed: ${reason}`)
medium line 1492

Template literal with variable interpolation in command context

SourceSKILL.md
1492throw new Error(`API error: ${result.left.type}`);
medium line 1615

Template literal with variable interpolation in command context

SourceSKILL.md
1615return `${first} ${last}`;
medium line 1622

Template literal with variable interpolation in command context

SourceSKILL.md
1622(f) => `${f} ${last}`
low line 1386

Fetch to external URL

SourceSKILL.md
1386() => fetch('/api/data'),
low line 1395

Fetch to external URL

SourceSKILL.md
1395() => fetch('/api/data'),
low line 1409

Fetch to external URL

SourceSKILL.md
1409() => fetch('/api/data'),
Scanned on May 15, 2026
View Security Dashboard
Installation guide →