Skip to content

Commit 24ca04b

Browse files
committed
fix: remove add-oauth subcommand and fix skill issues from code review
- Remove add-oauth subcommand and pipedrive-add-oauth skill (OAuth is always included in the scaffold, making the addon redundant) - Fix docker-compose template in add-app-extension skill to match actual generated output (Dockerfile.app-extension-ui, correct service config) - Fix stale src/pipedrive-client/ path in pipedrive-api skill (now src/pipedrive/) - Replace rg with grep in Codex marketplace-readiness-checks reference
1 parent 9bcc014 commit 24ca04b

14 files changed

Lines changed: 92 additions & 198 deletions

File tree

CLAUDE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ The CLI asks for:
4545
Beyond the interactive main flow, the CLI supports subcommands invoked by the AI plugin skills:
4646

4747
```bash
48-
npx create-pipedrive-app add-oauth [--output-dir <dir>]
4948
npx create-pipedrive-app add-app-extension --app-extensions custom-panel|custom-modal [--output-dir <dir>]
5049
```
5150

@@ -159,7 +158,6 @@ The `plugin/` directory is shipped with the npm package (`"files": ["dist", "plu
159158
| Skill | Purpose |
160159
|-------|---------|
161160
| `pipedrive-new-app` | Scaffold a new app interactively via `npx create-pipedrive-app` |
162-
| `pipedrive-add-oauth` | Add OAuth to an existing project via the `add-oauth` subcommand |
163161
| `pipedrive-add-app-extension` | Add a panel or modal extension via the `add-app-extension` subcommand |
164162
| `pipedrive-api` | Guide on using the Pipedrive REST API and SDK within a generated project |
165163
| `pipedrive-review-marketplace-readiness` | Gap analysis before marketplace submission: checks token refresh, HTTPS, error handling, and rate limit handling |

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ Both plugins expose the same slash commands:
8181
| Command | What it does |
8282
|---------|-------------|
8383
| `/pipedrive-new-app` | Scaffold a new integration project |
84-
| `/pipedrive-add-oauth` | Add OAuth to an existing project |
8584
| `/pipedrive-add-app-extension` | Add a custom panel or modal extension |
8685
| `/pipedrive-api` | Get guidance on using the Pipedrive API |
8786
| `/pipedrive-review-marketplace-readiness` | Check for gaps before submitting to the marketplace |

plugin/skills/pipedrive-add-app-extension/SKILL.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,56 @@ Read `frontend/app-extension-ui/src/main.tsx`. If the App Extensions frontend al
6767

6868
## Update docker-compose.yml
6969

70-
Read `docker-compose.yml`. If it does not already contain a `vite` or `frontend` service definition, add the Vite dev service. Model it after the service generated for a full scaffold:
70+
Read `docker-compose.yml`. If it does not already contain an `app-extension-ui` service, add it under `services:` and add `app_extension_ui_node_modules:` under `volumes:`:
7171

7272
```yaml
73-
frontend:
73+
services:
74+
app-extension-ui:
7475
build:
7576
context: .
76-
target: frontend-dev
77+
dockerfile: Dockerfile.app-extension-ui
78+
user: root
79+
command: sh -c "chown -R node:node /app/node_modules && su-exec node sh -c 'echo Installing dependencies... && npm install --no-package-lock --no-audit --no-fund --loglevel=error && npm run dev:frontend'"
80+
environment:
81+
CHOKIDAR_USEPOLLING: "true"
7782
ports:
7883
- "5173:5173"
84+
volumes:
85+
- ./package.json:/app/package.json:ro
86+
- app_extension_ui_node_modules:/app/node_modules
7987
develop:
8088
watch:
8189
- action: sync
82-
path: ./frontend
83-
target: /app/frontend
90+
path: ./frontend/app-extension-ui
91+
target: /app/frontend/app-extension-ui
92+
initial_sync: true
93+
ignore:
94+
- node_modules/
95+
- dist/
96+
- action: rebuild
97+
path: ./package.json
98+
99+
volumes:
100+
app_extension_ui_node_modules:
101+
```
102+
103+
Also create `Dockerfile.app-extension-ui` in the project root if it does not exist:
104+
105+
```dockerfile
106+
FROM node:24-alpine
107+
108+
RUN apk add --no-cache su-exec
109+
WORKDIR /app
110+
ENV NPM_CONFIG_USERCONFIG=/tmp/.npmrc
111+
RUN mkdir -p /app/node_modules && chown -R node:node /app
112+
USER node
113+
RUN npm config set registry https://registry.npmjs.org/
114+
115+
COPY --chown=node:node package.json ./
116+
COPY --chown=node:node frontend/app-extension-ui ./frontend/app-extension-ui
117+
118+
EXPOSE 5173
119+
CMD ["npm", "run", "dev:frontend"]
84120
```
85121

86122
## Report to developer

plugin/skills/pipedrive-add-oauth/SKILL.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

plugin/skills/pipedrive-api/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Pipedrive REST API v1 base URL is `https://api.pipedrive.com/v1`. It is stat
1212

1313
## Authentication in this project
1414

15-
This project uses **OAuth 2.0**. After a user authorises your app, the access token is stored in the database (`pipedrive_tokens` table). The generated `src/pipedrive-client/` module handles token retrieval and client initialisation:
15+
This project uses **OAuth 2.0**. After a user authorises your app, the access token is stored in the database (`pipedrive_tokens` table). The generated `src/pipedrive/` module handles token retrieval and client initialisation:
1616

1717
```ts
1818
import { getClient } from './pipedrive/client.js';
@@ -55,7 +55,7 @@ await client.activities.addActivity({
5555

5656
## Adding a new API call
5757

58-
1. Read `src/pipedrive-client/` to understand the existing wrapper pattern
58+
1. Read `src/pipedrive/` to understand the existing wrapper pattern
5959
2. Use `client.<resource>.<method>()` following the SDK method names
6060
3. Handle token expiry — the client wrapper in this project manages token refresh automatically
6161

plugins/create-pipedrive-app/skills/pipedrive-add-app-extension/SKILL.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,56 @@ Read `frontend/app-extension-ui/src/main.tsx`. If the App Extensions frontend al
6060

6161
## Update docker-compose.yml
6262

63-
Read `docker-compose.yml`. If it does not already contain a `vite` or `frontend` service definition, add the Vite dev service. Model it after the service generated for a full scaffold:
63+
Read `docker-compose.yml`. If it does not already contain an `app-extension-ui` service, add it under `services:` and add `app_extension_ui_node_modules:` under `volumes:`:
6464

6565
```yaml
66-
frontend:
66+
services:
67+
app-extension-ui:
6768
build:
6869
context: .
69-
target: frontend-dev
70+
dockerfile: Dockerfile.app-extension-ui
71+
user: root
72+
command: sh -c "chown -R node:node /app/node_modules && su-exec node sh -c 'echo Installing dependencies... && npm install --no-package-lock --no-audit --no-fund --loglevel=error && npm run dev:frontend'"
73+
environment:
74+
CHOKIDAR_USEPOLLING: "true"
7075
ports:
7176
- "5173:5173"
77+
volumes:
78+
- ./package.json:/app/package.json:ro
79+
- app_extension_ui_node_modules:/app/node_modules
7280
develop:
7381
watch:
7482
- action: sync
75-
path: ./frontend
76-
target: /app/frontend
83+
path: ./frontend/app-extension-ui
84+
target: /app/frontend/app-extension-ui
85+
initial_sync: true
86+
ignore:
87+
- node_modules/
88+
- dist/
89+
- action: rebuild
90+
path: ./package.json
91+
92+
volumes:
93+
app_extension_ui_node_modules:
94+
```
95+
96+
Also create `Dockerfile.app-extension-ui` in the project root if it does not exist:
97+
98+
```dockerfile
99+
FROM node:24-alpine
100+
101+
RUN apk add --no-cache su-exec
102+
WORKDIR /app
103+
ENV NPM_CONFIG_USERCONFIG=/tmp/.npmrc
104+
RUN mkdir -p /app/node_modules && chown -R node:node /app
105+
USER node
106+
RUN npm config set registry https://registry.npmjs.org/
107+
108+
COPY --chown=node:node package.json ./
109+
COPY --chown=node:node frontend/app-extension-ui ./frontend/app-extension-ui
110+
111+
EXPOSE 5173
112+
CMD ["npm", "run", "dev:frontend"]
77113
```
78114

79115
## Report to developer

plugins/create-pipedrive-app/skills/pipedrive-add-oauth/SKILL.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

plugins/create-pipedrive-app/skills/pipedrive-add-oauth/agents/openai.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

plugins/create-pipedrive-app/skills/pipedrive-api/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Pipedrive REST API v1 base URL is `https://api.pipedrive.com/v1`. It is stat
1212

1313
## Authentication in this project
1414

15-
This project uses **OAuth 2.0**. After a user authorises your app, the access token is stored in the database (`pipedrive_tokens` table). The generated `src/pipedrive-client/` module handles token retrieval and client initialisation:
15+
This project uses **OAuth 2.0**. After a user authorises your app, the access token is stored in the database (`pipedrive_tokens` table). The generated `src/pipedrive/` module handles token retrieval and client initialisation:
1616

1717
```ts
1818
import { getClient } from './pipedrive/client.js';
@@ -49,7 +49,7 @@ await client.activities.addActivity({
4949

5050
## Adding a new API call
5151

52-
1. Read `src/pipedrive-client/` to understand the existing wrapper pattern
52+
1. Read `src/pipedrive/` to understand the existing wrapper pattern
5353
2. Use `client.<resource>.<method>()` following the SDK method names
5454
3. Handle token expiry — the client wrapper in this project manages token refresh automatically
5555

plugins/create-pipedrive-app/skills/pipedrive-review-marketplace-readiness/references/marketplace-readiness-checks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Collect every failure before reporting.
1515
Run:
1616

1717
```bash
18-
rg -n "Authorization|Bearer|access_token" src -g "*.ts" -g "!src/pipedrive/client.ts"
18+
grep -rn "Authorization\|Bearer\|access_token" src --include="*.ts" | grep -v "src/pipedrive/client.ts"
1919
```
2020

2121
Review each direct `fetch(` or `axios` call with an Authorization header.
@@ -42,8 +42,8 @@ Fix: Use `getClient(companyId)` from `src/pipedrive/client.ts`, or add a 401 ret
4242
Run:
4343

4444
```bash
45-
rg -n "http://" src -g "*.ts"
46-
rg -n "trust proxy" src/app.ts
45+
grep -rn "http://" src --include="*.ts"
46+
grep -n "trust proxy" src/app.ts
4747
```
4848

4949
Fail if any production URL uses `http://`; ignore localhost and 127.0.0.1.
@@ -61,8 +61,8 @@ Report hardcoded HTTP URLs with file and line. For missing proxy trust, tell the
6161
Run:
6262

6363
```bash
64-
rg -n "NextFunction" src/app.ts
65-
rg -n "async.*req.*res" src -g "*.ts"
64+
grep -n "NextFunction" src/app.ts
65+
grep -rn "async.*req.*res" src --include="*.ts"
6666
```
6767

6868
Fail if `src/app.ts` has no 4-argument Express error middleware like:
@@ -83,7 +83,7 @@ Report each missing handler by file and line, and tell the developer to wrap the
8383
Run:
8484

8585
```bash
86-
rg -n "429|X-RateLimit|Retry-After" src -g "*.ts"
86+
grep -rn "429\|X-RateLimit\|Retry-After" src --include="*.ts"
8787
```
8888

8989
Fail if there is no handling for Pipedrive API rate limits. Pipedrive returns HTTP 429 and rate-limit headers including `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`.

0 commit comments

Comments
 (0)