@@ -1450,43 +1450,13 @@ def _refresh_subscription_token(creds_file: Path, creds: dict) -> str:
14501450 logger .info (f"BaselineClaudeCodeAgent: Token refreshed, valid for { expires_in // 60 } min" )
14511451 return new_access
14521452
1453- async def _install_sourcegraph_skill (self , environment : BaseEnvironment ) -> None :
1454- """Install the Sourcegraph MCP skill to teach the agent how to use MCP tools effectively.
1455-
1456- This skill provides:
1457- - Tool selection guidance (which Sourcegraph tool to use for each goal)
1458- - Query scoping with repo: and file: filters
1459- - Search type guidance (semantic vs keyword vs Deep Search)
1460- - Step-by-step workflows for implementing features
1461- - Common query patterns and mistake avoidance
1462-
1463- See: https://medium.com/@ajaynz/teaching-ai-to-navigate-your-codebase-agent-skills-sourcegraph-mcp-710b75ab2943
1464- """
1465- logger .info ("BaselineClaudeCodeAgent: Installing Sourcegraph MCP skill..." )
1466-
1467- # Install the skill using npx (Node.js should already be installed)
1468- # The skill provides guidance on how to effectively use Sourcegraph MCP tools
1469- result = await environment .exec ('npx -y skills add ajaynz/sourcegraph-skill' )
1470-
1471- # Check if installation succeeded by looking at output
1472- if result .stdout and ("added" in result .stdout .lower () or "skill" in result .stdout .lower ()):
1473- logger .info (f"BaselineClaudeCodeAgent: Sourcegraph skill installed: { result .stdout [:200 ] if result .stdout else '' } " )
1474- elif result .stderr :
1475- # Log warning but don't fail - skill is optional enhancement
1476- logger .warning (f"BaselineClaudeCodeAgent: Sourcegraph skill install warning: { result .stderr [:200 ]} " )
1477- else :
1478- logger .info (f"BaselineClaudeCodeAgent: Sourcegraph skill install output: { result .stdout [:200 ] if result .stdout else 'no output' } " )
1479-
14801453 async def _setup_sourcegraph_mcp (self , environment : BaseEnvironment ) -> None :
14811454 """Configure Sourcegraph MCP with all tools (keyword, NLS, Deep Search)."""
14821455 # Set NODE_TLS_REJECT_UNAUTHORIZED globally in container for MCP subprocess
14831456 # This works around Node.js fetch() SSL certificate validation issues in Docker
14841457 await environment .exec ('export NODE_TLS_REJECT_UNAUTHORIZED=0' )
14851458 logger .info ("BaselineClaudeCodeAgent: Set NODE_TLS_REJECT_UNAUTHORIZED=0 globally for MCP" )
1486-
1487- # Install the Sourcegraph skill to teach the agent how to use MCP tools effectively
1488- await self ._install_sourcegraph_skill (environment )
1489-
1459+
14901460 # Detect the correct working directory
14911461 # - swebench-verified uses /testbed
14921462 # - swebenchpro uses /app
@@ -1641,8 +1611,7 @@ async def _setup_sourcegraph_full_mcp(self, environment: BaseEnvironment, mcp_ty
16411611 await environment .exec ('export NODE_TLS_REJECT_UNAUTHORIZED=0' )
16421612 logger .info ("BaselineClaudeCodeAgent: Set NODE_TLS_REJECT_UNAUTHORIZED=0 globally for MCP" )
16431613
1644- # Install the Sourcegraph skill to teach the agent how to use MCP tools effectively
1645- await self ._install_sourcegraph_skill (environment )
1614+
16461615
16471616 # Detect the correct working directory
16481617 workspace_check = await environment .exec ('[ -d /workspace ] && echo EXISTS' )
@@ -1698,8 +1667,7 @@ async def _setup_sourcegraph_full_mcp(self, environment: BaseEnvironment, mcp_ty
16981667
16991668 async def _setup_deepsearch_mcp (self , environment : BaseEnvironment ) -> None :
17001669 """Configure Deep Search-only MCP endpoint."""
1701- # Install the Sourcegraph skill to teach the agent how to use MCP tools effectively
1702- await self ._install_sourcegraph_skill (environment )
1670+
17031671
17041672 # Detect the correct working directory
17051673 # - swebench-verified uses /testbed
@@ -1841,8 +1809,7 @@ async def _setup_deepsearch_mcp(self, environment: BaseEnvironment) -> None:
18411809
18421810 async def _setup_deepsearch_hybrid_mcp (self , environment : BaseEnvironment ) -> None :
18431811 """Configure Deep Search MCP with strategic local search fallback (hybrid approach)."""
1844- # Install the Sourcegraph skill to teach the agent how to use MCP tools effectively
1845- await self ._install_sourcegraph_skill (environment )
1812+
18461813
18471814 # Detect the correct working directory
18481815 # - swebench-verified uses /testbed
0 commit comments