AI Slop Code Risk Monitor

Wei-Shaw/claude-relay-service

SlopCodeMonitor badge for Wei-Shaw/claude-relay-service Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

0.9 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for Wei-Shaw/claude-relay-service, a JavaScript project with 12,761 GitHub stars. SynthScan examined 213,446 lines of code across 362 source files, recording 156 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

0.9
Adjusted Signal
0.9
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
12.8K
Stars
JavaScript
Language
213.4K
Lines of Code
362
Files
156
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 3.5/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 140 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

Are imports declared and package/API names verified? 5 finding(s).

Agent Over-Engineering Ratio 3.5/100 · LOW

Are wrappers, guards, and repeated structures necessary? 125 finding(s).

PR Review Velocity Impact 4.3/100 · LOW

Which changes need focused human review? 156 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 17LOW 139

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 156 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers114 hits · 117 pts
SeverityFileLineSnippetContext
LOWweb/admin-spa/src/views/DashboardView.vue1285function createApiKeysUsageTrendChart() {CODE
LOWweb/admin-spa/src/views/DashboardView.vue1479async function updateApiKeysUsageTrendChart() {CODE
LOWweb/admin-spa/src/views/DashboardView.vue1485function createAccountUsageTrendChart() {CODE
LOWweb/admin-spa/src/views/DashboardView.vue1652async function handleAccountUsageGroupChange(group) {CODE
LOWtests/metadataUserIdHelper.integration.test.js131function oldExtractSessionFromMetadata(userId) {CODE
LOWtests/metadataUserIdHelper.integration.test.js137function oldExtractOriginalSessionId(userId) {CODE
LOWscripts/reset-request-detail-retention-hours.js58async function resetRequestDetailRetentionHours() {CODE
LOWsrc/middleware/auth.js29async function shouldRejectDueToOverload(apiKeyId, timeoutMs, queueConfig, maxQueueSize) {CODE
LOWsrc/utils/signatureCache.js43function getOrCreateSessionCache(sessionId) {CODE
LOWsrc/utils/testPayloadHelper.js303function createChatCompletionsTestPayload(model = 'gpt-4o-mini', options = {}) {CODE
LOWsrc/utils/requestDetailHelper.js133function extractOpenAIReasoningInfo(payload) {CODE
LOWsrc/utils/requestDetailHelper.js147function extractAnthropicReasoningInfo(payload) {CODE
LOWsrc/utils/requestDetailHelper.js205function extractGeminiReasoningInfo(payload) {CODE
LOWsrc/utils/requestDetailHelper.js243function extractRequestReasoningInfo(payload) {CODE
LOWsrc/utils/requestDetailHelper.js289function extractPreviewReasoningInfo(preview) {CODE
LOWsrc/utils/requestDetailHelper.js363function resolveRequestDetailReasoning(detail = {}) {CODE
LOWsrc/utils/requestDetailHelper.js515function sanitizeRequestBodySnapshot(body, options = {}) {CODE
LOWsrc/utils/requestDetailHelper.js590function finalizeRequestDetailMeta(requestMeta = null) {CODE
LOWsrc/utils/requestDetailHelper.js607function extractOpenAICacheReadTokens(usage = {}) {CODE
LOWsrc/utils/requestDetailHelper.js658function getRequestDetailCacheMetrics(detail = {}) {CODE
LOWsrc/utils/oauthHelper.js105function generateSetupTokenAuthUrl(codeChallenge, state) {CODE
LOWsrc/utils/antigravityUpstreamDump.js67async function dumpAntigravityUpstreamRequest(requestInfo) {CODE
LOWsrc/utils/grokHelper.js314function normalizeKnownBaseURLPath(raw) {CODE
LOWsrc/utils/grokHelper.js392function defaultBaseUrlForAuthType(authType) {CODE
LOWsrc/utils/grokHelper.js466function supportsXHighReasoningEffort(model) {CODE
LOWsrc/utils/grokHelper.js472function normalizeReasoningEffortValue(raw, model) {CODE
LOWsrc/utils/grokHelper.js507function normalizeChatCompletionsBody(body) {CODE
LOWsrc/utils/grokHelper.js581function shouldApplyCLIProxyHeaders(targetUrl) {CODE
LOWsrc/utils/grokHelper.js741async function exchangeAuthorizationCode({CODE
LOWsrc/utils/grokHelper.js835function extractAccountInfoFromTokens(tokens = {}) {CODE
LOWsrc/utils/anthropicResponseDump.js55function summarizeAnthropicResponseBody(body) {CODE
LOWsrc/utils/anthropicResponseDump.js102async function dumpAnthropicNonStreamResponse(req, statusCode, body, meta = {}) {CODE
LOWsrc/utils/anthropicResponseDump.js110async function dumpAnthropicStreamSummary(req, summary, meta = {}) {CODE
LOWsrc/utils/antigravityUpstreamResponseDump.js68async function dumpAntigravityUpstreamResponse(responseInfo) {CODE
LOWsrc/utils/antigravityUpstreamResponseDump.js105async function dumpAntigravityStreamEvent(eventInfo) {CODE
LOWsrc/utils/antigravityUpstreamResponseDump.js133async function dumpAntigravityStreamSummary(summaryInfo) {CODE
LOWsrc/utils/contents.js316function getTrailingPlaceholderAnchor(template) {CODE
LOWsrc/utils/contents.js339function trimRawValueByTrailingPlaceholder(rawValue, template) {CODE
LOWsrc/utils/contents.js404function normalizeValueForTemplate(normalizedValue, template, normalizedTemplate) {CODE
LOWsrc/utils/contents.js425function matchesTemplateIgnoringPlaceholders(normalizedValue, parts) {CODE
LOWsrc/utils/contents.js450function bestSimilarityByTemplates(value) {CODE
LOWsrc/utils/warmupInterceptor.js69function isTitleExtractionSystemPrompt(systemText) {CODE
LOWsrc/utils/grokQuota.js165function normalizeSubscriptionTier(raw) {CODE
LOWsrc/utils/grokQuota.js200function subscriptionTierFromClaims(payload = {}) {CODE
LOWsrc/utils/performanceOptimizer.js62function getHttpsAgentForNonStream() {CODE
LOWsrc/utils/anthropicRequestDump.js89async function dumpAnthropicMessagesRequest(req, meta = {}) {CODE
LOWsrc/utils/accountRollingUsage.js60function extractModelUsageFromHourlyHash(data = {}) {CODE
LOWsrc/utils/antigravityModel.js99function normalizeAntigravityModelInput(model, defaultModel = DEFAULT_ANTIGRAVITY_MODEL) {CODE
LOWsrc/utils/antigravityModel.js114function getAntigravityModelMetadata(modelName) {CODE
LOWsrc/utils/antigravityModel.js132function mapAntigravityUpstreamModel(model) {CODE
LOWsrc/routes/unified.js557function buildGeminiRequestFromOpenAI(body) {CODE
LOWsrc/routes/openaiGeminiRoutes.js24function ensureAntigravityProjectId(account) {CODE
LOWsrc/routes/openaiGeminiRoutes.js143function convertGeminiResponseToOpenAI(geminiResponse, model, stream = false) {CODE
LOWsrc/routes/admin/apiKeys.js409async function getApiKeysSortedByCostPrecomputed(options) {CODE
LOWsrc/routes/admin/apiKeys.js517async function getApiKeysSortedByCostCustom(options) {CODE
LOWsrc/routes/admin/sync.js52function buildModelMappingFromSupportedModels(supportedModels) {CODE
LOWsrc/handlers/geminiHandlers.js203function ensureGeminiPermissionMiddleware(req, res, next) {CODE
LOWsrc/handlers/geminiHandlers.js259function sanitizeFunctionResponsesForApiKey(contents) {CODE
LOWsrc/handlers/geminiHandlers.js322async function normalizeAxiosStreamError(error) {CODE
LOWsrc/handlers/geminiHandlers.js1806async function handleStreamGenerateContent(req, res) {CODE
54 more matches not shown…
Decorative Section Separators11 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUM⚡src/utils/contents.js100 text: '## Insights\nIn order to encourage learning, before and after writing code, always provide brief educational CODE
MEDIUM⚡src/utils/contents.js105 text: 'You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engCODE
MEDIUM⚡src/utils/contents.js110 text: 'You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engCODE
MEDIUMsrc/routes/userRoutes.js764// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/routes/userRoutes.js766// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/routes/admin/quotaCards.js11// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/routes/admin/quotaCards.js13// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/routes/admin/quotaCards.js166// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/routes/admin/quotaCards.js168// ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/services/apiKeyService.js2716 // ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMsrc/services/apiKeyService.js2718 // ═══════════════════════════════════════════════════════════════════════════COMMENT
Over-Commented Block14 hits · 14 pts
SeverityFileLineSnippetContext
LOWweb/admin-spa/src/views/AccountsView.vue5581// 监听排序选择变化 - 已重构为 handleDropdownSort,此处注释保留原逻辑参考COMMENT
LOWweb/admin-spa/src/views/DashboardView.vue1741// 切换自动刷新COMMENT
LOWweb/admin-spa/src/views/ApiKeysView.vue4301 }COMMENT
LOWweb/admin-spa/src/views/ApiKeysView.vue4321// if (!key.weeklyOpusCostLimit || key.weeklyOpusCostLimit === 0) return 0COMMENT
LOWweb/admin-spa/src/views/ApiKeysView.vue4381COMMENT
LOWcli/index.js621// async function listClaudeAccounts() {COMMENT
LOWcli/index.js641// account.email || '-',COMMENT
LOWsrc/middleware/auth.js321 // 槽位所有权转移说明:COMMENT
LOWsrc/middleware/auth.js581 // 当第一个请求正在处理,第二个请求进入排队时,它们共用同一个 socketCOMMENT
LOWsrc/middleware/auth.js2001COMMENT
LOWsrc/middleware/auth.js2021// points: 1000, // 请求数量COMMENT
LOWsrc/utils/modelHelper.js161 // Match: -{major}-{minor}-{date} or -{major}-{date} or -{major}COMMENT
LOWsrc/routes/grokRoutes.js61//COMMENT
LOWsrc/routes/api.js221 const isStream = req.body.stream === trueCOMMENT
AI Slop Vocabulary5 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMsrc/utils/contents.js70 text: 'You are an interactive CLI tool that helps users __PLACEHOLDER__ Use the instructions below and the tools avaCODE
MEDIUM⚡src/utils/contents.js165 text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\CODE
MEDIUM⚡src/utils/contents.js165 text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\CODE
MEDIUMsrc/routes/openaiRoutes.js26 "You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.\n\n## GeneralCODE
MEDIUMsrc/routes/openaiRoutes.js26 "You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.\n\n## GeneralCODE
Structural Annotation Overuse5 hits · 8 pts
SeverityFileLineSnippetContext
LOWREADME_EN.md124### Step 1: Environment SetupCOMMENT
LOWREADME_EN.md149### Step 2: Download and ConfigureCOMMENT
LOWREADME_EN.md164### Step 3: Configuration File SetupCOMMENT
LOWREADME_EN.md193### Step 4: Start ServiceCOMMENT
LOW⚡src/utils/contents.js165 text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\CODE
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippetContext
LOWweb/admin-spa/src/components/common/ModelSelector.vue22 :placeholder="placeholder"CODE
LOWweb/admin-spa/src/views/SettingsView.vue1797 placeholder="user@example.com"CODE
LOWweb/admin-spa/src/views/SettingsView.vue1853 placeholder="admin@example.com"CODE
LOWtests/grokAccountModes.test.js198 email: 'user@example.com'CODE
LOWsrc/services/relay/droidRelayService.js1050 headers['x-api-key'] = 'placeholder'CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/utils/contents.js70 text: 'You are an interactive CLI tool that helps users __PLACEHOLDER__ Use the instructions below and the tools avaCODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOW⚡src/utils/contents.js165 text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\CODE