Narrative:

Climbing on the SID; departure told us to stop our climb at 6;000 ft. Instead of 7;000 due to traffic. We complied. Once we leveled off at 6;000 we saw 2 targets on TCAS at 12 o'clock; one at our altitude and one 500 ft. Above around 6 miles away. The target at our altitude disappeared off the TCAS screen but the one at 6;500 was still there and caused a TA (traffic advisory). The target then got closer but the TCAS showed it at 400 ft. Above and then finally gave us a preventative RA (resolution advisory) where the top arc of the TCAS was red. We finally saw the traffic which passed on our right side. Got the 'clear of conflict' announcement and reported the RA to ATC. VFR traffic transiting the airspace along with IFR traffic at altitudes [is] too close in my opinion. More vertical separation needed.

Google
 

Original NASA ASRS Text

Title: Flight Crew reported encountering an NMAC event during climb.

Narrative: Climbing on the SID; Departure told us to stop our climb at 6;000 ft. instead of 7;000 due to traffic. We complied. Once we leveled off at 6;000 we saw 2 targets on TCAS at 12 o'clock; one at our altitude and one 500 ft. above around 6 miles away. The target at our altitude disappeared off the TCAS screen but the one at 6;500 was still there and caused a TA (Traffic Advisory). The target then got closer but the TCAS showed it at 400 ft. above and then finally gave us a Preventative RA (Resolution Advisory) where the top arc of the TCAS was red. We finally saw the traffic which passed on our right side. Got the 'Clear of conflict' announcement and reported the RA to ATC. VFR traffic transiting the airspace along with IFR traffic at altitudes [is] too close in my opinion. More vertical separation needed.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.